From: Stefan Metzmacher Date: Wed, 7 Jan 2015 08:16:57 +0000 (+0100) Subject: wafsamba: improve -fvisibility=hidden, we should check it together this WERROR_CFLAGS X-Git-Tag: samba-4.2.0rc5~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=320ee4ed36fe2b1c4bb22942373ad13768ae420f;p=thirdparty%2Fsamba.git wafsamba: improve -fvisibility=hidden, we should check it together this WERROR_CFLAGS GCC ignores -fvisibility=hidden with a warning instead of failing om some platforms (e.g. Solaris). Bug: https://bugzilla.samba.org/show_bug.cgi?id=11031 Based on a patch from Tom Schulz . Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme (cherry picked from commit 46fdd6221e9c64b459e0d05e6d02d89deb8dafb5) --- diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 0a1cd1ce3ea..c49b20e1153 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -341,7 +341,7 @@ def configure(conf): else: conf.env.HAVE_LD_VERSION_SCRIPT = False - if conf.CHECK_CFLAGS('-fvisibility=hidden'): + if conf.CHECK_CFLAGS(['-fvisibility=hidden'] + conf.env.WERROR_CFLAGS): conf.env.VISIBILITY_CFLAGS = '-fvisibility=hidden' conf.CHECK_CODE('''int main(void) { return 0; } __attribute__((visibility("default"))) void vis_foo2(void) {}''',