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>
(cherry picked from commit
46fdd6221e9c64b459e0d05e6d02d89deb8dafb5)
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) {}''',