summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2021-03-02 22:47:35 +0100
committerBjoern Jacke <bjacke@samba.org>2021-03-03 11:31:34 +0000
commit996560191ac6bd603901dcd6c0de5d239e019ef4 (patch)
treedd7e34e714b8feda14307358047be37349b0eea6 /wscript
parent1c9add54750cb7f2b49be69a548ce8bdb15e7ac2 (diff)
downloadsamba-996560191ac6bd603901dcd6c0de5d239e019ef4.tar.gz
wscript: use --as-needed only if tested successfully
Some OSes like Solaris based OmiOS don't support this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14288 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'wscript')
-rw-r--r--wscript3
1 files changed, 2 insertions, 1 deletions
diff --git a/wscript b/wscript
index 334b2988234..3c6b130bd22 100644
--- a/wscript
+++ b/wscript
@@ -340,7 +340,8 @@ def configure(conf):
# allows us to find problems on our development hosts faster.
# It also results in faster load time.
- conf.add_as_needed()
+ conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
+
if not conf.CHECK_NEED_LC("-lc not needed"):
conf.ADD_LDFLAGS('-lc', testflags=False)