libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/11] libtool: support versioning on OS/2


From: KO Myung-Hun
Subject: [PATCH 10/11] libtool: support versioning on OS/2
Date: Tue, 4 Nov 2014 15:12:45 +0900

* build-aux/ltmain.in (func_mode_link): Set major and versuffix.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Set version_type to windows.
Add a version information to soname_spec.
---
 build-aux/ltmain.in |    2 +-
 m4/libtool.m4       |    7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 0d90df9..745b94b 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -6254,7 +6254,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
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 76bc96c..e62e7b4 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2808,12 +2808,17 @@ openbsd* | bitrig*)
 
 os2*)
   libname_spec='$name'
+  version_type=windows
   shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
   # OS/2 limits a length of a DLL basename up to 8 characters.
   # So there is need to use a short name instead of a original name
   # longer than 8 characters. And replace '.' with '_'.
-  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
-- 
1.7.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]