Hi! With the patch posted with subject: [PATCH] tests: import variables for MSVC. I found that libtool tries to put some bad symbols in the generated symbol lookup table leading to errors such as this:
libtool: link: (cd .libs && /home/peda/automake/lib/compile cl -MD -Zi -EHsc -c "helldl.exeS.c") Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. helldl.exeS.c helldl.exeS.c(25) : error C2143: syntax error : missing '{' before '-' helldl.exeS.c(25) : error C2059: syntax error : '-' helldl.exeS.c(39) : error C2065: '_IMPORT_DESCRIPTOR_hello' : undeclared identifier helldl.exeS.c(39) : error C2036: 'void *' : unknown size make: *** [helldl.exe] Error 2 This patch fixes those problems. No regressions otherwise. Ok to push? Cheers, Peter >From b36c46a667443d4bacd99281f23f44fff1add44e Mon Sep 17 00:00:00 2001 From: Peter Rosin <p...@lysator.liu.se> Date: Thu, 23 Sep 2010 23:02:42 +0200 Subject: [PATCH] msvc: don't try to export import descriptors. * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin, mingw] [pw32, cegcc] <cl*, exclude_expsyms>: Don't export symbols in import libraries related to describing what dll(s) the import library is importing. Fixes problem in tests/demo-make.test and some other tests. Signed-off-by: Peter Rosin <p...@lysator.liu.se> --- ChangeLog | 9 +++++++++ libltdl/m4/libtool.m4 | 5 ++++- 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 647c151..b5f183d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-09-23 Peter Rosin <p...@lysator.liu.se> + + msvc: don't try to export import descriptors. + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin, mingw] + [pw32, cegcc] <cl*, exclude_expsyms>: Don't export symbols in + import libraries related to describing what dll(s) the import + library is importing. Fixes problem in tests/demo-make.test + and some other tests. + 2010-09-22 Ralf Wildenhues <ralf.wildenh...@gmx.de> Fix regression in command-line length computation. diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 6aebb63..ce33bfe 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -4492,7 +4492,9 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*|_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'] + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -5064,6 +5066,7 @@ _LT_EOF # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*|_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'] _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -- 1.7.1