summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2021-03-02 22:47:35 +0100
committerKarolin Seeger <kseeger@samba.org>2021-03-05 11:22:22 +0000
commiteebf510fbd8847077c7bec72a1cda674b5a02714 (patch)
tree463924ebf397a0b3882958052c9ba3f5ec4d9abc
parent0eb58c2d68b68e63a603bb4a3fdced5c3cae4a68 (diff)
downloadsamba-eebf510fbd8847077c7bec72a1cda674b5a02714.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> (cherry picked from commit 996560191ac6bd603901dcd6c0de5d239e019ef4)
-rw-r--r--wscript3
1 files changed, 2 insertions, 1 deletions
diff --git a/wscript b/wscript
index e50aba255a7..7c13e29bffa 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)