summarylogtreecommitdiffstats
path: root/mongodb-4.4.1-fix-scons.patch
blob: 3d93d18e586f7b15862e03ae82a070b359ba0576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git a/SConstruct b/SConstruct
index 89c044ab..a6d02072 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2064,7 +2064,6 @@ if env.TargetOSIs('posix'):
     env.Append( CCFLAGS=["-fno-omit-frame-pointer",
                          "-fno-strict-aliasing",
                          "-fasynchronous-unwind-tables",
-                         "-ggdb" if not env.TargetOSIs('emscripten') else "-g",
                          "-pthread",
                          "-Wall",
                          "-Wsign-compare",
@@ -2076,6 +2075,9 @@ if env.TargetOSIs('posix'):
             env.Append( CCFLAGS=["-Werror"] )
 
     env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
+    env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
+    env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
     if env.ToolchainIs('clang'):
         env.Append( CXXFLAGS=['-Werror=unused-result'] )
 
@@ -2096,8 +2098,8 @@ if env.TargetOSIs('posix'):
 
     env.Append( LIBS=[] )
 
-    #make scons colorgcc friendly
-    for key in ('HOME', 'TERM'):
+    #make scons colorgcc, distcc, ccache friendly
+    for key in ('HOME', 'PATH', 'TERM', 'DISTCC_HOSTS'):
         try:
             env['ENV'][key] = os.environ[key]
         except KeyError: