* Peter Rosin wrote on Sun, Sep 05, 2010 at 10:01:42PM CEST: > From 449723f9bdcad6946e098d7acf0f215f3a4c18a2 Mon Sep 17 00:00:00 2001 > From: Peter Rosin <p...@lysator.liu.se> > Date: Sun, 5 Sep 2010 17:53:35 +0200 > Subject: [PATCH 5/7] Convert POSIX file names to toolchain format for MSVC > > * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
I usually stick <archive_cmds, archive_expsyms_cmds> in here somewhere. > [mingw] <cl>: Make sure the -outputresource: file name for the > manifest tool is in Win32 format. Same for the MSVC command file > containing the exports. Actually, I think this is a wee bit ugly. The *_cmds variables are echoed back to the user, who ideally is supposed to be able to cut and paste them for debugging purposes (at least after running the mode=link with RM="echo " or so). That won't work with internal function names. Would it easily be possible to do the name conversions inside ltmain before invoking the commands? Thanks, Ralf > --- a/libltdl/m4/libtool.m4 > +++ b/libltdl/m4/libtool.m4 > @@ -5004,7 +5004,8 @@ _LT_EOF > else > sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < > $export_symbols > $output_objdir/$soname.exp; > fi~ > - $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs > @$output_objdir/$soname.exp -Wl,-DLL~ > + func_to_tool_file "$output_objdir/$soname.exp"~ > + $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs > "@$func_to_tool_file_result" -Wl,-DLL~ > linknames=' > # The linker will not automatically build a static lib if we build a > DLL. > # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' > @@ -5017,8 +5018,9 @@ _LT_EOF > *.exe|*.EXE) ;; > *) lt_outputfile="$lt_outputfile.exe" ;; > esac~ > + func_to_tool_file "$lt_outputfile"~ > if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; > then > - $MANIFEST_TOOL -manifest "$lt_outputfile.manifest" > -outputresource:"$lt_outputfile" || exit 1; > + $MANIFEST_TOOL -manifest "$func_to_tool_file_result.manifest" > -outputresource:"$func_to_tool_file_result" || exit 1; > $RM "$lt_outputfile.manifest"; > fi' > ;; > @@ -5999,7 +6001,8 @@ if test "$_lt_caught_CXX_error" != yes; then > else > $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < > $export_symbols > $output_objdir/$soname.exp; > fi~ > - $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs > @$output_objdir/$soname.exp -Wl,-DLL~ > + func_to_tool_file "$output_objdir/$soname.exp"~ > + $CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs > "@$func_to_tool_file_result" -Wl,-DLL~ > linknames=' > # The linker will not automatically build a static lib if we build a > DLL. > # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' > @@ -6011,8 +6014,9 @@ if test "$_lt_caught_CXX_error" != yes; then > *.exe|*.EXE) ;; > *) lt_outputfile="$lt_outputfile.exe" ;; > esac~ > + func_to_tool_file "$lt_outputfile"~ > if test "$MANIFEST_TOOL" != ":" && test -f > "$lt_outputfile.manifest"; then > - $MANIFEST_TOOL -manifest "$lt_outputfile.manifest" > -outputresource:"$lt_outputfile" || exit 1; > + $MANIFEST_TOOL -manifest "$func_to_tool_file_result.manifest" > -outputresource:"$func_to_tool_file_result" || exit 1; > $RM "$lt_outputfile.manifest"; > fi'