wafsamba: improve -fvisibility=hidden, we should check it together this WERROR_CFLAGS
authorStefan Metzmacher <metze@samba.org>
Wed, 7 Jan 2015 08:16:57 +0000 (09:16 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 8 Jan 2015 22:38:07 +0000 (23:38 +0100)
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 <schulz@adi.com>.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
buildtools/wafsamba/wscript

index 0a1cd1ce3eac555b803dc8a66964ebcbed3ad1a7..c49b20e1153ab2b259c9f09eb0cbea75c90cadf5 100755 (executable)
@@ -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) {}''',