diff options
-rw-r--r-- | SConstruct | 3 | ||||
-rw-r--r-- | distsrc/client/SConstruct | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 1e8806af578..f6989a6469d 100644 --- a/SConstruct +++ b/SConstruct @@ -745,6 +745,9 @@ if nix: env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) env.Append( LIBS=[] ) + if GetOption( "sharedclient" ): + env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) + if debugBuild: env.Append( CPPFLAGS=" -O0 -fstack-protector " ); env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind diff --git a/distsrc/client/SConstruct b/distsrc/client/SConstruct index 8aa279be4a4..59b47d922c2 100644 --- a/distsrc/client/SConstruct +++ b/distsrc/client/SConstruct @@ -34,6 +34,7 @@ elif "linux2" == os.sys.platform: if nix: env.Append( CPPFLAGS=" -O3" ) + env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) boostLibs = [ "thread" , "filesystem" , "system" ] env.Prepend( LIBS =["boost_%s-mt"%(lib) for lib in boostLibs ] ) |