diff options
author | Andrew Morrow <acm@10gen.com> | 2013-06-06 10:55:38 -0400 |
---|---|---|
committer | Andrew Morrow <acm@10gen.com> | 2013-06-07 18:48:18 -0400 |
commit | 288d347dbfcd99f49f75b8d2313aa49429b9119c (patch) | |
tree | b94e5fcd821c392db5fc4a64a48996b20608685d | |
parent | 6975c883e8c431985037ded4a6d78c92f0a7c802 (diff) | |
download | mongo-288d347dbfcd99f49f75b8d2313aa49429b9119c.tar.gz |
SERVER-6514 Only apply -zdefs and --as-needed to shared client library
(cherry picked from commit ce97dc76c6a3f399f2f67613a55a7c238384ede9)
-rw-r--r-- | SConstruct | 3 | ||||
-rwxr-xr-x | distsrc/client/SConstruct | 2 | ||||
-rw-r--r-- | src/SConscript.client | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct index 35a9db4057b..979f9cd47aa 100644 --- a/SConstruct +++ b/SConstruct @@ -711,9 +711,6 @@ if nix: except KeyError: pass - if linux and has_option( "sharedclient" ): - env.Append( SHLINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) - if linux and has_option( "gcov" ): env.Append( CXXFLAGS=" -fprofile-arcs -ftest-coverage " ) env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " ) diff --git a/distsrc/client/SConstruct b/distsrc/client/SConstruct index ed95f0a639a..17fa954fc9d 100755 --- a/distsrc/client/SConstruct +++ b/distsrc/client/SConstruct @@ -80,7 +80,7 @@ else: if nix: env.Append(CCFLAGS=["-O3", "-pthread"]) if linux: - env.Append(LINKFLAGS=["-Wl,--as-needed", "-Wl,-zdefs", "-pthread"]) + env.Append(LINKFLAGS=["-pthread"]) boostLibs = ["thread", "filesystem", "system"] conf = Configure(env) diff --git a/src/SConscript.client b/src/SConscript.client index 18cab70b90d..31f77351fcf 100644 --- a/src/SConscript.client +++ b/src/SConscript.client @@ -4,7 +4,7 @@ # programs. Import('env has_option installSetup use_system_version_of_library') -Import('nix darwin windows') +Import('nix linux darwin windows') buildShared = False if has_option("sharedclient"): @@ -193,6 +193,9 @@ if buildShared: # libraries as dependency terminals. LIBDEPS=mongoClientLibDeps) + if linux: + sharedLibEnv.AppendUnique(SHLINKFLAGS=["-Wl,--as-needed", "-Wl,-zdefs"]) + mongoClientSharedLib = sharedLibEnv.SharedLibrary('mongoclient', clientObjects) mongoClientSharedLibInstall = sharedLibEnv.Install( |