libtool-patches
[Top][All Lists]
Advanced

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

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


From: KO Myung-Hun
Subject: [PATCH 10/10] libtool: support versioning on OS/2
Date: Sun, 12 Oct 2014 17:33:55 +0900

* build-aux/ltmain.in (func_mode_link): Append major to soname_spec.
Set major and versuffix.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Set version_type to windows.
Append major to soname_spec.
---
 build-aux/ltmain.in |    4 ++--
 m4/libtool.m4       |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 39b1b53..3a1d720 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -4865,7 +4865,7 @@ func_mode_link ()
          continue
          ;;
        os2dllname)
-         soname_spec="\`eval \$ECHO $arg | cut -b -8 | tr . _\`\${shared_ext}"
+         soname_spec="\`eval \$ECHO $arg | cut -b -\$((8 - \${#major})) | tr . 
_\`\${major}\${shared_ext}"
          prev=
          continue
          ;;
@@ -6252,7 +6252,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 b0414be..dcb0e86 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2808,12 +2808,14 @@ 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='`eval $ECHO $libname | cut -b -8 | tr . _`${shared_ext}'
+  soname_spec='`eval $ECHO $libname | cut -b -$((8 - ${#major})) | tr . 
_`${major}${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]