summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKO Myung-Hun <komh@chollian.net>2014-11-04 12:27:05 +0000
committerGary V. Vaughan <gary@gnu.org>2014-11-04 15:11:38 +0000
commitee9ff7b399246cd5fd75127c174b96f9d3ea98dc (patch)
tree8ebd734db62316c692868f970a939fa3ca9ac11c
parent4ee10a1e431ea3ddaf795d793a5a27189d3a115e (diff)
downloadlibtool-ee9ff7b399246cd5fd75127c174b96f9d3ea98dc.tar.gz
libtool: add -os2dllname option.
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>
-rw-r--r--NEWS3
-rw-r--r--build-aux/ltmain.in14
-rw-r--r--doc/libtool.texi4
-rw-r--r--m4/libtool.m42
4 files changed, 21 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 79f49421..e6a92f09 100644
--- 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]
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 4c8a0673..a0f5ed0f 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -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)
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 89c5d1a1..9f0b1311 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -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?$}
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 3efdfa66..b2e1ec7e 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -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