]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: add -os2dllname option.
authorKO Myung-Hun <komh@chollian.net>
Tue, 4 Nov 2014 12:27:05 +0000 (12:27 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 4 Nov 2014 15:11:38 +0000 (15:11 +0000)
On OS/2, if there are many DLLs whose prefix is the same and
very long, the resulting DLLs are overwritten. Provide a new
option to force a DLL name.
* build-aux/ltmain.in (func_mode_help): Add a description for
-os2dllname.
(func_mode_link): Add -os2dllname.
* doc/libtool.texi: Document it.
* NEWS: Update.

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

diff --git a/NEWS b/NEWS
index 79f494215e4dcbb6032612d193bf7440e42bb35c..e6a92f09ddfdae4b3af70cdaaa4428ca445543ca 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,9 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
        ./configure CC=tcc LD=tcc
 
+  - Added -os2dllname option to work around 8 character base name
+    limit on OS/2.  The option has no effect on other systems.
+
 
 * Noteworthy changes in release 2.4.3 (2014-10-27) [stable]
 
index 4c8a0673f201209c0c4c3098417ff5386d3022ea..a0f5ed0f5a85a6f2bfa0f92a2547a421598e2be6 100644 (file)
@@ -1818,7 +1818,8 @@ The following components of LINK-COMMAND are treated specially:
   -no-install       link a not-installable executable
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -objectlist FILE  use a list of object files found in FILE to specify objects
+  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
   -precious-files-regex REGEX
                     don't remove output files matching REGEX
   -release RELEASE  specify package release information
@@ -4606,6 +4607,7 @@ func_mode_link ()
     module=no
     no_install=no
     objs=
+    os2dllname=
     non_pic_objects=
     precious_files_regex=
     prefer_static_libs=no
@@ -4863,6 +4865,11 @@ func_mode_link ()
          prev=
          continue
          ;;
+       os2dllname)
+         os2dllname=$arg
+         prev=
+         continue
+         ;;
        precious_regex)
          precious_files_regex=$arg
          prev=
@@ -5172,6 +5179,11 @@ func_mode_link ()
        continue
        ;;
 
+      -os2dllname)
+       prev=os2dllname
+       continue
+       ;;
+
       -o) prev=output ;;
 
       -precious-files-regex)
index 89c5d1a1f588ac399cf914e4b7ac87275839fa25..9f0b1311c4ace27592a75c017fc82a632b0d9e1e 100644 (file)
@@ -1531,6 +1531,10 @@ Create @var{output-file} from the specified objects and libraries.
 @item -objectlist @var{file}
 Use a list of object files found in @var{file} to specify objects.
 
+@item -os2dllname @var{name}
+Use this to change the DLL base name on OS/2 to @var{name}, to keep
+within the 8 character base name limit on this system.
+
 @item -precious-files-regex @var{regex}
 Prevents removal of files from the temporary output directory whose
 names match this regular expression.  You might specify @samp{\.bbg?$}
index 3efdfa666ea6e3b20851088814d4bb064c4a884b..b2e1ec7e86ab9d67c166e24b395ca27fa06c2392 100644 (file)
@@ -2811,7 +2811,7 @@ os2*)
   shrext_cmds=.dll
   need_lib_prefix=no
   # OS/2 can only load a DLL with a base name of 8 characters or less.
-  soname_spec='`eval $ECHO $libname | cut -b -8 | tr . _`$shared_ext'
+  soname_spec='`test -n "$os2dllname" && libname=$os2dllname; $ECHO $libname | cut -b -8 | tr . _`$shared_ext'
   library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
   shlibpath_var=BEGINLIBPATH