summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_conftests.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-08 11:26:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-08 05:26:06 +0100
commitd0c93ba115a942403982011d01c443aa18513fe7 (patch)
treedbbe067e0ea812cf980680457bfd2d276d99261a /buildtools/wafsamba/samba_conftests.py
parent84ac1f8f6a633f363f64a0f49d063ae7750d11b5 (diff)
downloadsamba-d0c93ba115a942403982011d01c443aa18513fe7.tar.gz
samba-d0c93ba115a942403982011d01c443aa18513fe7.tar.bz2
samba-d0c93ba115a942403982011d01c443aa18513fe7.zip
waf: added configure test for -Wl,--version-script
this checks that the linker supports --version-script Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools/wafsamba/samba_conftests.py')
-rw-r--r--buildtools/wafsamba/samba_conftests.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index 4811614ab7..2246ac3fa5 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -133,7 +133,7 @@ int foo(int v) {
# into several parts. I'd quite like to create a set of CHECK_COMPOUND()
# functions that make writing complex compound tests like this much easier
@conf
-def CHECK_LIBRARY_SUPPORT(conf, rpath=False, msg=None):
+def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
'''see if the platform supports building libraries'''
if msg is None:
@@ -171,9 +171,17 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, msg=None):
bld.rescan(bld.srcnode)
+ ldflags = []
+ if version_script:
+ ldflags.append("-Wl,--version-script=%s/vscript" % bld.path.abspath())
+ dest = open(os.path.join(dir,'vscript'), 'w')
+ dest.write('TEST_1.0A2 { global: *; };\n')
+ dest.close()
+
bld(features='cc cshlib',
source='libdir/lib1.c',
target='libdir/lib1',
+ ldflags=ldflags,
name='lib1')
o = bld(features='cc cprogram',