]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: support versioning on OS/2.
authorKO Myung-Hun <komh@chollian.net>
Tue, 4 Nov 2014 13:23:24 +0000 (13:23 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 4 Nov 2014 15:11:59 +0000 (15:11 +0000)
* build-aux/ltmain.in (func_mode_link) <*-os2*>: Set major and
versuffix.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) <*-os2*>: Set
version_type to windows. Add a version information to soname_spec.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
NEWS
build-aux/ltmain.in
m4/libtool.m4

diff --git a/NEWS b/NEWS
index 71cd2e9dde86c9d0094a1f52b5137146c9edf0a5..9bff5585c5540f1dac44c250701152d6d214e545 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,7 +27,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool
   - Added -os2dllname option to work around 8 character base name
     limit on OS/2.  The option has no effect on other systems.
 
-  - Support for -export-symbols and -export-symbols-regex on OS/2.
+  - Support for DLL versioning, -export-symbols and -export-symbols-regex
+    on OS/2.
 
 
 * Noteworthy changes in release 2.4.3 (2014-10-27) [stable]
index a0f5ed0f5a85a6f2bfa0f92a2547a421598e2be6..65ada0b66889cc40685788775c1d1e0cdaf59b49 100644 (file)
@@ -6262,7 +6262,7 @@ func_mode_link ()
            elif test -n "$soname_spec"; then
              # bleh windows
              case $host in
-             *cygwin* | mingw* | *cegcc*)
+             *cygwin* | mingw* | *cegcc* | *os2*)
                func_arith $current - $age
                major=$func_arith_result
                versuffix=-$major
index 32fee6fb13d197857cf4cf8734d3f5656414d17b..281e70faed8a5d5739320aa0364acc0e155fa9d3 100644 (file)
@@ -2808,10 +2808,15 @@ openbsd* | bitrig*)
 
 os2*)
   libname_spec='$name'
+  version_type=windows
   shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
   # OS/2 can only load a DLL with a base name of 8 characters or less.
-  soname_spec='`test -n "$os2dllname" && libname=$os2dllname; $ECHO $libname | cut -b -8 | tr . _`$shared_ext'
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
   library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
   shlibpath_var=BEGINLIBPATH