--- mongodb-src-r3.2.1/SConstruct 2016-01-05 19:31:44.000000000 +0100 +++ mongodb-src-r3.2.1-lunar/SConstruct 2016-02-06 20:24:11.257647347 +0100 @@ -812,6 +812,7 @@ INTEGRATION_TEST_LIST='$BUILD_ROOT/integration_tests.txt', CONFIGUREDIR=sconsDataDir.Dir('sconf_temp'), CONFIGURELOG=sconsDataDir.File('config.log'), + ENV=os.environ, INSTALL_DIR=installDir, CONFIG_HEADER_DEFINES={}, LIBDEPS_TAG_EXPANSIONS=[], @@ -1371,7 +1372,6 @@ env.Append( CCFLAGS=["-fno-omit-frame-pointer", "-fPIC", "-fno-strict-aliasing", - "-ggdb", "-pthread", "-Wall", "-Wsign-compare", @@ -1382,7 +1382,9 @@ if not has_option("disable-warnings-as-errors"): env.Append( CCFLAGS=["-Werror"] ) + env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program