this makes our runtime load times smaller, and also means we find bugs
that this may cause on gentoo. gentoo uses this by default
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 3 00:35:56 UTC 2010 on sn-devel-104
# resolution of symbols
conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
+ # gentoo always adds this. We want our normal build to be as
+ # strict as the strictest OS we support, so adding this here
+ # allows us to find problems on our development hosts faster.
+ # It also results in faster load time.
+ conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
+
# we don't want PYTHONDIR in config.h, as otherwise changing
# --prefix causes a complete rebuild
del(conf.env.defines['PYTHONDIR'])