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>
This commit is contained in:
KO Myung-Hun 2014-11-04 12:27:05 +00:00 committed by Gary V. Vaughan
parent 4ee10a1e43
commit ee9ff7b399
4 changed files with 21 additions and 2 deletions

3
NEWS
View File

@ -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]

View 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)

View 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?$}

2
m4/libtool.m4 vendored
View 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