diff options
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_abi.py | 12 | ||||
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 17 |
2 files changed, 14 insertions, 15 deletions
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 4059fe3378..d5376ca1e7 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -146,11 +146,9 @@ def abi_process_file(fname, version, symmap): symmap[symname] = version f.close() -def abi_write_vscript(vscript, libname, vnum, symmap): +def abi_write_vscript(vscript, libname, version, symmap): '''write a vscript file for a library in --version-script format''' - libname = libname.replace("-", "_").replace("+","_").upper() - invmap = {} for s in symmap: invmap.setdefault(symmap[s], []).append(s) @@ -182,10 +180,10 @@ def abi_build_vscript(task): basename = os.path.basename(fname) version = basename[len(task.env.LIBNAME)+1:-len(".sigs")] abi_process_file(fname, version, symmap) - abi_write_vscript(tgt, task.env.LIBNAME, task.env.VNUM, symmap) + abi_write_vscript(tgt, task.env.LIBNAME, task.env.VERSION, symmap) -def ABI_VSCRIPT(bld, libname, abi_directory, vnum, vscript): +def ABI_VSCRIPT(bld, libname, abi_directory, version, vscript): '''generate a vscript file for our public libraries''' if abi_directory: source = bld.path.ant_glob('%s/%s-[0-9]*.sigs' % (abi_directory, libname)) @@ -201,7 +199,7 @@ def ABI_VSCRIPT(bld, libname, abi_directory, vnum, vscript): source=source, group='vscripts', target=vscript) - t.env.VNUM = vnum + t.env.VERSION = version t.env.LIBNAME = libname - t.vars = [vnum, vscript] + t.vars = [libname, version, vscript] Build.BuildContext.ABI_VSCRIPT = ABI_VSCRIPT diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index aea9d2bf30..f37f10da16 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -195,10 +195,6 @@ def SAMBA_LIBRARY(bld, libname, source, if vnum: Logs.error("vnum is invalid for private libraries") sys.exit(1) - vnum = None - version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION) - else: - version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION.split(".")[0]) features = 'cc cshlib symlink_lib install_lib' if target_type == 'PYTHON': @@ -210,10 +206,15 @@ def SAMBA_LIBRARY(bld, libname, source, if abi_directory: features += ' abi_check' - if bld.env.HAVE_LD_VERSION_SCRIPT: - vscript = "%s.vscript" % libname - bld.ABI_VSCRIPT(libname, abi_directory, vnum, vscript) - ldflags.append("-Wl,--version-script=%s/%s" % (bld.path.abspath(bld.env), vscript)) + + if bld.env.HAVE_LD_VERSION_SCRIPT: + vscript = "%s.vscript" % libname + if private_library: + version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION) + else: + version = "%s_%s" % (libname, vnum) + bld.ABI_VSCRIPT(libname, abi_directory, version, vscript) + ldflags.append("-Wl,--version-script=%s/%s" % (bld.path.abspath(bld.env), vscript)) bld.SET_BUILD_GROUP(group) t = bld( |