diff -urN mongodb-src-r1.6.0.orig/SConstruct mongodb-src-r1.6.0/SConstruct --- mongodb-src-r1.6.0.orig/SConstruct 2010-08-05 15:32:06.000000000 +0200 +++ mongodb-src-r1.6.0/SConstruct 2010-08-16 16:12:52.000000000 +0200 @@ -745,8 +745,7 @@ if nix: env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) - if linux: - env.Append( CPPFLAGS=" -Werror " ) + env.Append( CXXFLAGS=os.environ['CXXFLAGS']) env.Append( CXXFLAGS=" -Wnon-virtual-dtor " ) env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) env.Append( LIBS=[] ) @@ -757,8 +756,6 @@ if debugBuild: env.Append( CPPFLAGS=" -O0 -fstack-protector " ); env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind - else: - env.Append( CPPFLAGS=" -O3" ) if debugLogging: env.Append( CPPFLAGS=" -D_DEBUG" );