libtool: feed .def files verbatim to the MSVC linker

m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [MSVC]
<archive_expsym_cmds>: When the symbol list isn't really a symbol list,
but instead a .def file, copy it to a file with .def extension so that
MSVC recognizes it as a module-definition file and feed it verbatim.
NEWS: Update

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
This commit is contained in:
Peter Rosin 2013-01-16 13:39:52 +01:00
parent 93cba573d2
commit ae4c1d3593
2 changed files with 8 additions and 2 deletions

4
NEWS
View File

@ -62,6 +62,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool
in some corner cases.
- Use the improved Microsoft dumpbin support to mend preloading of
import libraries for Microsoft Visual C/C++.
- No longer mangle module-definition (.def) files when feeding them to
the Microsoft Visual C/C++ linker via the -export-symbols argument to
the libtool script, thus matching how .def files are handled when
using GNU tools.
** Important incompatible changes:

6
m4/libtool.m4 vendored
View File

@ -5163,7 +5163,8 @@ _LT_EOF
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
_LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
$SED -e 1D -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cp "$export_symbols" "$output_objdir/$soname.def";
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
else
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
fi~
@ -6154,7 +6155,8 @@ if test yes != "$_lt_caught_CXX_error"; then
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
_LT_TAGVAR(archive_expsym_cmds, $1)='if test EXPORTS = "`$SED 1q $export_symbols`"; then
$SED -e 1D -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cp "$export_symbols" "$output_objdir/$soname.def";
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
else
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
fi~