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]

Re: error in crosscompiling with -mno-cygwin


On 29 Jul 2004 at 11:45, silverio.di@qem.it wrote:

> Hi to all,
> I've a problem during creating crosscompiling tool-chain.
> 
> What I would:
> 
> - I have Cygwin last release (today updated)
> - I would to obtain Hitachi sh-coff tool chain (binutils-gcc) for XP
> without cygwin1.dll use
> 
> I've already done binutils without problems with:
> 
>   export CC='gcc -mno-cygwin'
>   export CXX='g++ -mno-cygwin'
>   tar -xjf binutils-2.15.tar.bz2
>   mkdir binutils-2.15-building
>   cd binutils-2.15-building
>   ../binutils-2.15/configure --target=sh-coff --prefix=/opt/sh-coff
>   make all info install
> 
> the output files at /opt/sh-coff/bin are for sh-coff target without
> cygwin1.dll depencencies: WONDERFUL !!!
> 
> Now when I try to do same thing with gcc I obtain always same error:
> 
> export PATH=/opt/sh-coff/bin:$PATH
> tar -xjf gcc-3.3.2.tar.bz2
> tar -xzf newlib-1.12.0.tar.gz
> cd gcc.3.3.2
> ln -s ../newlib-1.12.0/newlib .
> cd ..
> mkdir gcc-3.3.2-building
> cd gcc-3.3.2-building
> ../gcc-3.3.2/configure --target=sh-coff --prefix=/opt/sh-coff
> --enable-languages=c --with-newlib --with-gnu-as --with-gnu-ld
> make all info install
> 
> At this point after some compiling time I obtain:
> 
> gcc -mno-cygwin   -g -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic
> -Wno-long-long   -DHAVE_CONFIG_H  -o Tcollect2.exe \
>       collect2.o tlink.o intl.o version.o ./intl/libintl.a
> ../libiberty/libiberty.a
> collect2.o(.text+0x2f8): In function `handler':
> /home/Silverio_Diqui/building/sh01-004-building/gcc-3.3.2-building/gcc/../../gcc-3.3.2
> /gcc/collect2.c:447: undefined reference to `_kill'
> collect2.o(.text+0x3a4e): In function `scan_prog_file':
> /home/Silverio_Diqui/building/sh01-004-building/gcc-3.3.2-building/gcc/../../gcc-3.3.2
> /gcc/collect2.c:2091: undefined reference to `_pipe'
> collect2.o(.text+0x3b1c):/home/Silverio_Diqui/building/sh01-004-building/gcc-3.3.2-building/gcc/../../gcc-3.3.2
> /gcc/collect2.c:2114: undefined reference to `_fork'
> collect2: ld returned 1 exit status
> make[1]: *** [collect2.exe] Error 1
> make[1]: Leaving directory
> `/home/Silverio_Diqui/building/sh01-004-building/gcc-3.3.2-building/gcc'
> make: *** [all-gcc] Error 2
> 
> What I've mistaked ?
> Thank you for suggestions....


When building for mingw in cygwin you should also configure with --build=mingw32 and 
--host=mingw32. But that still won't address those errors you get for building gcc. For those, 
see PR#14316:
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14316>
There's a patch in that bug report that should help.

But there was a recent post to the list that pointed to a place where you can get prebuilt 
binaries for a SH toolchain:
<http://gcc.gnu.org/ml/gcc/2004-07/msg01313.html>

HTH
Eric



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