diff options
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 12 |
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'] |