diff --git a/SConstruct b/SConstruct index b759094..5d667f4 100644 --- a/SConstruct +++ b/SConstruct @@ -745,9 +745,9 @@ else: 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=os.environ['LDFLAGS'] ) env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) env.Append( LIBS=[] ) @@ -757,8 +757,6 @@ if nix: 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" ); dev /usr/local/portage/dev-db/mongodb # cat files/mongodb-1.6.2-fix-shared.patch diff --git a/SConstruct b/SConstruct index 5d667f4..f9d853e 100644 --- a/SConstruct +++ b/SConstruct @@ -753,6 +753,7 @@ if nix: if linux and GetOption( "sharedclient" ): env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) + env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so.1" ) if debugBuild: env.Append( CPPFLAGS=" -O0 -fstack-protector " ); @@ -1539,7 +1540,6 @@ if installSetup.clientSrc: #lib if installSetup.libraries: - env.Install( installDir + "/" + nixLibPrefix, clientLibName ) if GetOption( "sharedclient" ): env.Install( installDir + "/" + nixLibPrefix, sharedClientLibName )