From: Peter Rosin Date: Wed, 16 Jan 2013 12:39:52 +0000 (+0100) Subject: libtool: feed .def files verbatim to the MSVC linker X-Git-Tag: v2.4.2.418~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae4c1d3593b004379ba9137a3c2414a9e81c5837;p=thirdparty%2Flibtool.git libtool: feed .def files verbatim to the MSVC linker m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [MSVC] : 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 --- diff --git a/NEWS b/NEWS index fe2c6dbd2..c202c43c8 100644 --- a/NEWS +++ b/NEWS @@ -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: diff --git a/m4/libtool.m4 b/m4/libtool.m4 index f28436e83..526fe81b6 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -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~