From d0c93ba115a942403982011d01c443aa18513fe7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 8 Dec 2010 11:26:32 +1100 Subject: waf: added configure test for -Wl,--version-script this checks that the linker supports --version-script Pair-Programmed-With: Andrew Bartlett --- buildtools/wafsamba/samba_conftests.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'buildtools/wafsamba/samba_conftests.py') 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', -- cgit