summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_autoconf.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-11-13 18:01:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-11-13 19:38:38 +0100
commit86afe83d867229b11fd4ec9cb6e29af698cacdef (patch)
treebd3af9eeb082c5177895689bcf3068e30b5df55c /buildtools/wafsamba/samba_autoconf.py
parentaf5c6fba68a05e9e196f4e9133b07cb1d62cc981 (diff)
downloadsamba-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
Diffstat (limited to 'buildtools/wafsamba/samba_autoconf.py')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py12
1 files changed, 12 insertions, 0 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']