diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-11-13 18:01:09 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-11-13 19:38:38 +0100 |
commit | 86afe83d867229b11fd4ec9cb6e29af698cacdef (patch) | |
tree | bd3af9eeb082c5177895689bcf3068e30b5df55c | |
parent | af5c6fba68a05e9e196f4e9133b07cb1d62cc981 (diff) | |
download | samba-86afe83d867229b11fd4ec9cb6e29af698cacdef.tar.gz samba-86afe83d867229b11fd4ec9cb6e29af698cacdef.tar.bz2 samba-86afe83d867229b11fd4ec9cb6e29af698cacdef.zip |
waf: Factor checking for undefined symbol flags out into separate method.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 13 19:38:38 CET 2011 on sn-devel-104
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 12 | ||||
-rwxr-xr-x | lib/ldb/wscript | 2 | ||||
-rw-r--r-- | lib/talloc/wscript | 2 | ||||
-rw-r--r-- | lib/tdb/wscript | 2 | ||||
-rw-r--r-- | lib/tevent/wscript | 2 | ||||
-rwxr-xr-x | wscript | 10 |
6 files changed, 21 insertions, 9 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 909e836fdb..1ea818ef30 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -712,3 +712,15 @@ def SETUP_CONFIGURE_CACHE(conf, enable): preproc.recursion_limit = 1 # in either case we don't need to scan system includes preproc.go_absolute = False + + +@conf +def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf): + # we don't want any libraries or modules to rely on runtime + # resolution of symbols + if sys.platform != "openbsd4": + conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True) + + if sys.platform != "openbsd4" and conf.env.undefined_ignore_ldflags == []: + if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']): + conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup'] diff --git a/lib/ldb/wscript b/lib/ldb/wscript index a3af27515c..088292cd9e 100755 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -75,6 +75,8 @@ def configure(conf): conf.SAMBA_CONFIG_H() + conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + def build(bld): bld.RECURSE('lib/tdb_compat') bld.RECURSE('lib/tevent') diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 72e954ad65..447406bf6e 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -67,6 +67,8 @@ def configure(conf): conf.SAMBA_CONFIG_H() + conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + def build(bld): bld.RECURSE('lib/replace') diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 678d2f2847..ebbab2cc92 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -55,6 +55,8 @@ def configure(conf): conf.SAMBA_CONFIG_H() + conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + def build(bld): bld.RECURSE('lib/replace') diff --git a/lib/tevent/wscript b/lib/tevent/wscript index 63b27e542e..6f94d803b5 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -58,6 +58,8 @@ def configure(conf): conf.SAMBA_CONFIG_H() + conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() + def build(bld): bld.RECURSE('lib/replace') bld.RECURSE('lib/talloc') @@ -101,15 +101,7 @@ def configure(conf): conf.RECURSE('selftest') conf.RECURSE('source3') - # we don't want any libraries or modules to rely on runtime - # resolution of symbols - if sys.platform != "openbsd4": - conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True) - - if sys.platform != "openbsd4" and conf.env.undefined_ignore_ldflags == []: - if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']): - conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup'] - + conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS() # gentoo always adds this. We want our normal build to be as # strict as the strictest OS we support, so adding this here |