[PATCH] build: use as-needed linker flag also on OpenBSD
Björn Jacke
bj at sernet.de
Thu Sep 10 19:40:21 UTC 2015
OpenBSD is unusable with binaries with many superfluous libs linked in.
samba-tool start times of 250 seconds without as-needed vs. 1.4 seconds with
as-needed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11355
Signed-off-by: Bjoern Jacke <bj at sernet.de>
---
wscript | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/wscript b/wscript
index a84e5d5..9431e11 100644
--- a/wscript
+++ b/wscript
@@ -166,8 +166,7 @@ def configure(conf):
# allows us to find problems on our development hosts faster.
# It also results in faster load time.
- if not sys.platform.startswith("openbsd"):
- conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
+ conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
if not conf.CHECK_NEED_LC("-lc not needed"):
conf.ADD_LDFLAGS('-lc', testflags=False)
--
2.4.2
More information about the samba-technical
mailing list