summaryrefslogtreecommitdiffstats
path: root/buildtools
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-01-07 09:56:56 +0100
committerJeremy Allison <jra@samba.org>2015-01-08 23:38:07 +0100
commit4683fc0f1dc5af3bcf81edaebfbd6c8d3b38df9e (patch)
tree048ce66bb4801763bb30e85e567c07192ceda588 /buildtools
parent208be32c6a9b275c507fb5e3334b832a3cb9578a (diff)
downloadsamba-4683fc0f1dc5af3bcf81edaebfbd6c8d3b38df9e.tar.gz
samba-4683fc0f1dc5af3bcf81edaebfbd6c8d3b38df9e.tar.xz
samba-4683fc0f1dc5af3bcf81edaebfbd6c8d3b38df9e.zip
wafsamba: move -fvisibility=hidden checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'buildtools')
-rwxr-xr-xbuildtools/wafsamba/wscript7
1 files changed, 7 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 0e2afe1149..0a1cd1ce3e 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -341,6 +341,13 @@ def configure(conf):
else:
conf.env.HAVE_LD_VERSION_SCRIPT = False
+ if conf.CHECK_CFLAGS('-fvisibility=hidden'):
+ conf.env.VISIBILITY_CFLAGS = '-fvisibility=hidden'
+ conf.CHECK_CODE('''int main(void) { return 0; }
+ __attribute__((visibility("default"))) void vis_foo2(void) {}''',
+ cflags=conf.env.VISIBILITY_CFLAGS,
+ define='HAVE_VISIBILITY_ATTR', addmain=False)
+
if sys.platform.startswith('aix'):
conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True)
# Might not be needed if ALL_SOURCE is defined