From: Björn Jacke Date: Tue, 2 Mar 2021 21:47:35 +0000 (+0100) Subject: wscript: use --as-needed only if tested successfully X-Git-Tag: samba-4.12.12~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c63f00801cae16a855aa5283fa0cc449e84577ce;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett (cherry picked from commit 996560191ac6bd603901dcd6c0de5d239e019ef4) --- diff --git a/wscript b/wscript index a195ac33c98..2020c6793f0 100644 --- a/wscript +++ b/wscript @@ -321,7 +321,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)