Error building cross compiler from mainline
Timothy J. Wood
tjw@omnigroup.com
Mon Jan 7 00:44:00 GMT 2002
I'm trying to build a Mac OS X -> Win32 (MinGW) cross compiler using
the latest CVS mainline sources (and I want to be using DLLs instead of
static libraries for stuff like libobjc). I've previously done this
with the 2.95.2 based compiler from www.mingw.org (except for the DLL
part), but the MinGW folks claim that GCC mainline should mostly work
now.
I installed a recent binutils snapshot with the target
'i386-mingw32msvc' w/o any trouble.
Then, when I try to configure and build GCC, I did:
../../source/gcc/gcc/configure -v
--prefix=/Users/Shared/$USER/Build/MinGW --target=i386-mingw32msvc
--with-gnu-as --with-gnu-ld --disable-multilib --enable-shared
--disable-static --enable-languages="objc"
make CC="cc -no-cpp-precomp"
This built along for a while and then when building libobjc I got
stuff like the following:
./libtool --mode=compile
/Users/Shared/bungi/Build/Intermediates/MinGW/builds/gcc/gcc/xgcc
-B/Users/Shared/bungi/Build/Intermediates/MinGW/builds/gcc/gcc/
-B/Users/Shared/bungi/Build/MinGW/i386-mingw32msvc/bin/
-B/Users/Shared/bungi/Build/MinGW/i386-mingw32msvc/lib/ -isystem
/Users/Shared/bungi/Build/MinGW/i386-mingw32msvc/include -c -I.
-I../../../../source/gcc/gcc/libobjc -g -DIN_GCC -DIN_TARGET_LIBS
-I../../../../source/gcc/gcc/libobjc/objc
-I../../../../source/gcc/gcc/libobjc/../gcc
-I../../../../source/gcc/gcc/libobjc/../gcc/config -I../../gcc
-I../../../../source/gcc/gcc/libobjc/../include
../../../../source/gcc/gcc/libobjc/archive.c
head: : No such file or directory
./libtool: command not found: \[$]2 [214]
./libtool: no such file or directory: \ >> $output_objdir/$soname-
def;;\n *) echo \ [215]
expr: non-numeric argument
./libtool: command too long: \ >> $output_objdir/$soname-def;;\n
esac;\n _lt_hint=\;\n done;\n fi~\n \n $CC
-Wl,--base-file,$output_objdir/$soname-base -mdll
-Wl,-e,_DllMainCRTStartup@12 -o $output_objdir/$soname $libobjs $deplibs
$compiler_flags~\n $DLLTOOL --as=$AS --dllname $soname
--exclude-symbols
DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@
12,DllEntryPoint@12 --def $output_objdir/$soname-def --base-file
$output_objdir/$soname-base --output-exp $output_objdir/$soname-
exp~\n $CC -Wl,--base-file,$output_objdir/$soname-base
$output_objdir/$soname-exp -mdll -Wl,-e,_DllMainCRTStartup@12 -o
$output_objdir/$soname $libobjs $deplibs $compiler_flags~\n
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols
DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@
12,DllEntryPoint@12 --def $output_objdir/$soname-def --base-file
$output_objdir/$soname-base --output-exp $output_objdir/$soname-exp
--output-lib $output_objdir/$libname.dll.a~\n $CC
$output_objdir/$soname-exp -mdll -Wl,-e,_DllMainCRTStartup@12 -o
$output_objdir/$soname $libobjs $deplibs $compiler_flags [225]
./libtool: command not found: @ [333]
./libtool: no such file or directory: .*$//\ <
$output_objdir/$soname-def > $export_symbols [333]
./libtool: no such file or directory: \/\* [337]
./libtool: command not found: p [337]
./libtool: no such file or directory: }\ -e d < $0 >
$output_objdir/impgen.c~\n test -f $output_objdir/impgen.exe || (cd
$output_objdir && \\n if test \x$HOST_CC\ != \x\ ; then $HOST_CC -o
impgen impgen.c ; \\n else $CC -o impgen impgen.c ; fi)~\n
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def [341]
mkdir .libs
/Users/Shared/bungi/Build/Intermediates/MinGW/builds/gcc/gcc/xgcc
-B/Users/Shared/bungi/Build/Intermediates/MinGW/builds/gcc/gcc/
-B/Users/Shared/bungi/Build/MinGW/i386-mingw32msvc/bin/
-B/Users/Shared/bungi/Build/MinGW/i386-mingw32msvc/lib/ -isystem
/Users/Shared/bungi/Build/MinGW/i386-mingw32msvc/include -c -I.
-I../../../../source/gcc/gcc/libobjc -g -DIN_GCC -DIN_TARGET_LIBS
-I../../../../source/gcc/gcc/libobjc/objc
-I../../../../source/gcc/gcc/libobjc/../gcc
-I../../../../source/gcc/gcc/libobjc/../gcc/config -I../../gcc
-I../../../../source/gcc/gcc/libobjc/../include
../../../../source/gcc/gcc/libobjc/archive.c -DDLL_EXPORT -DPIC -o
.libs/archive.o
Presumably this stems from the truly horrible section of libtool:
archive_expsym_cmds="if test \\"x\\`head -1 \$export_symbols\\`\\" =
xEXPORTS; then
cp \$export_symbols \$output_objdir/\$soname-def;
else
echo EXPORTS > \$output_objdir/\$soname-def;
_lt_hint=1;
cat \$export_symbols | while read symbol; do
set dummy \\$symbol;
case \\[\$]# in
2) echo \\" \\[\$]2 @ \\$_lt_hint ; \\" >>
\$output_objdir/\$soname-def;;
*) echo \\" \\[\$]2 @ \\$_lt_hint \\[\$]3 ; \\" >>
\$output_objdir/\$soname-def;;
esac;
_lt_hint=\\`expr 1 + \\$_lt_hint\\`;
done;
fi~
\$CC -Wl,--base-file,\$output_objdir/\$soname-base -mdll
-Wl,-e,_DllMainCRTStartup@12 -o \$output_objdir/\$soname \$libobjs
\$deplibs \$compiler_flags~
\$DLLTOOL --as=\$AS --dllname \$soname --exclude-symbols
DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@
12,DllEntryPoint@12 --def \$output_objdir/\$soname-def --base-file
\$output_objdir/\$soname-base --output-exp \$output_objdir/\$soname-exp~
\$CC -Wl,--base-file,\$output_objdir/\$soname-base
\$output_objdir/\$soname-exp -mdll -Wl,-e,_DllMainCRTStartup@12 -o
\$output_objdir/\$soname \$libobjs \$deplibs \$compiler_flags~
\$DLLTOOL --as=\$AS --dllname \$soname --exclude-symbols
DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@
12,DllEntryPoint@12 --def \$output_objdir/\$soname-def --base-file
\$output_objdir/\$soname-base --output-exp \$output_objdir/\$soname-exp
--output-lib \$output_objdir/\$libname.dll.a~
\$CC \$output_objdir/\$soname-exp -mdll
-Wl,-e,_DllMainCRTStartup@12 -o \$output_objdir/\$soname \$libobjs
\$deplibs \$compiler_flags"
Does anyone have any advise about what I may have done wrong?
-tim
More information about the Gcc
mailing list