buildtools: only use the ABI based version script for non private libraries
authorStefan Metzmacher <metze@samba.org>
Thu, 9 Dec 2010 15:34:28 +0000 (16:34 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 14 Dec 2010 12:22:38 +0000 (13:22 +0100)
Private libraries should not expose the symbols from the public namespace,
as then we may conflict with external libraries.

E.g. if we build tdb as private library, we want to be sure we're using the
private library and symbols, even if we also have the system libtdb.so loaded
via some external modules.

metze

buildtools/wafsamba/wafsamba.py

index 3cb97c07236a23efc4cdcd24d03cd59bb3b8d4bc..7fbb345e324a07c170a92c842fbfc51de29af50f 100644 (file)
@@ -206,12 +206,15 @@ def SAMBA_LIBRARY(bld, libname, source,
         vscript = "%s.vscript" % libname
         if private_library:
             version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION)
+            vscript_abi_directory = None
         elif vnum:
             version = "%s_%s" % (libname, vnum)
+            vscript_abi_directory = abi_directory
         else:
             version = None
+            vscript_abi_directory = None
         if version:
-            bld.ABI_VSCRIPT(libname, abi_directory, version, vscript)
+            bld.ABI_VSCRIPT(libname, vscript_abi_directory, version, vscript)
             ldflags.append("-Wl,--version-script=%s/%s" % (bld.path.abspath(bld.env), vscript))
             fullname = bld.env.shlib_PATTERN % bundled_name
             bld.add_manual_dependency(bld.path.find_or_declare(fullname), bld.path.find_or_declare(vscript))