More generic check for OpenBSD platform
authorVadim Zhukov <persgray@gmail.com>
Fri, 17 May 2013 08:43:08 +0000 (12:43 +0400)
committerBjoern Jacke <bj@sernet.de>
Fri, 17 May 2013 15:58:16 +0000 (17:58 +0200)
OpenBSD versioning is different from many other
projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the
right approach will be to check that platform name starts with "openbsd"
instead. This is also the thing OpenBSD developers do when patching other
software, so this patch is consistent with already existing practicies.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9888

Reviewed-by: Lars Müller <lars@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104

buildtools/wafsamba/samba_autoconf.py
lib/ldb/wscript
wscript

index 65c66f393bc592c7444016aa30199b60d6b12b0e..fe110bd7e381815699d50d25bd6c9ecd686925e9 100644 (file)
@@ -776,9 +776,9 @@ def SETUP_CONFIGURE_CACHE(conf, enable):
 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" and sys.platform != "openbsd5":
+    if not sys.platform.startswith("openbsd"):
         conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
 
-    if sys.platform != "openbsd4" and sys.platform != "openbsd5" and conf.env.undefined_ignore_ldflags == []:
+    if not sys.platform.startswith("openbsd") and conf.env.undefined_ignore_ldflags == []:
         if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']):
             conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
index fbed6fd594f53b4873f2b7427da84ea77a0107a5..fbfed1af8d105f10155c79d8088f1d07123a1173 100755 (executable)
@@ -64,7 +64,7 @@ def configure(conf):
 
         # we don't want any libraries or modules to rely on runtime
         # resolution of symbols
-        if sys.platform != "openbsd4" and sys.platform != "openbsd5":
+        if not sys.platform.startswith("openbsd"):
             conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
 
     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
diff --git a/wscript b/wscript
index a7432283c5d38a92b93ce273364539a84d0a0206..3509939a7ba0dfe024123b6da17845c0e391e6eb 100644 (file)
--- a/wscript
+++ b/wscript
@@ -140,7 +140,7 @@ def configure(conf):
     # allows us to find problems on our development hosts faster.
     # It also results in faster load time.
 
-    if sys.platform != "openbsd4":
+    if not sys.platform.startswith("openbsd"):
         conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
 
     if not conf.CHECK_NEED_LC("-lc not needed"):