summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-06-06 10:55:38 -0400
committerAndrew Morrow <acm@10gen.com>2013-06-06 13:39:50 -0400
commitce97dc76c6a3f399f2f67613a55a7c238384ede9 (patch)
tree6538bfa02ba2945756784f31d0e2dc88df351b90
parent732d51ad8de1940c467de2b64e8acafb02d228a0 (diff)
downloadmongo-ce97dc76c6a3f399f2f67613a55a7c238384ede9.tar.gz
SERVER-6514 Only apply -zdefs and --as-needed to shared client library
-rw-r--r--SConstruct3
-rwxr-xr-xdistsrc/client/SConstruct2
-rw-r--r--src/SConscript.client5
3 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct
index 0e21da381fb..b05f98029a0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -743,9 +743,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 e26bae03f9e..99e020a2283 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"):
@@ -196,6 +196,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(