[PATCH] build: use as-needed linker flag also on OpenBSD
Ralph Böhme
rb at sernet.de
Thu Sep 10 20:05:30 UTC 2015
On Thu, Sep 10, 2015 at 09:40:21PM +0200, Björn Jacke wrote:
> 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
rb: me.
-Ralph
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
More information about the samba-technical
mailing list