This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.1 regresssion: libtool broken for cross to MinGW



   I'm crossing from powerpc-apple-darwin5.4 to i386-pc-mingw32msvc and 
the libtool script that gets generated in libobjc (and probably other 
directories, but this is the first place I die) has the following:

archive_expsym_cmds="if test \\"x\\`head -1 \$export_symbols\\`\\" = 
xEXPORTS; then
         cp \$export_symbols \$output_objdir/\$soname-def;

	... blah blah blah ...
       \$CC \$output_objdir/\$soname-exp -mdll 
-Wl,-e,_DllMainCRTStartup@12 -o \$output_objdir/\$soname \$libobjs 
\$deplibs \$compiler_flags"


   This apparently gets generated from the following in ltcf-c.sh:

     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = 
xEXPORTS; then
         cp $export_symbols $output_objdir/$soname-def;

	... blah blah blah ...

       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' 
-Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs 
$deplibs $compiler_flags'

   (This same sort of gunk is in libtool 1.4.2's libtool.m4)

   Later, this seems to get quoted in ltconfig via a for loop that has as 
its body:

       # Double-quote double-evaled strings.
       eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e 
\"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e 
\"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
       ;;
     *)
       eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e 
\"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
       ;;


   Now, it doesn't look like Mac OS X's shell is busted since I built 
bash 2.0.5a and ran a narrowed down script:

#!/bin/sh
archive_expsym_cmds="if test \\"x\\`head -1 nofile\\`\\" = xEXPORTS; 
then  fi"

   through bash and it said:

% ./bash /tmp/foo.sh
/tmp/foo.sh: command substitution: line 3: syntax error: unexpected end 
of file


   Building this cross compiler worked with the MinGW 2.9.5-based 
snapshots, but is busted in 3.1 (I don't think MinGW had any special 
libtool hacks to make this work, but I could be wrong).

-tim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]