compiling on linux a crossgcc running on cygwin to build linux target

bertrand marquis bertrand.marquis@sysgo.com
Thu Mar 18 08:26:00 GMT 2004


It seems that you must specifie the build system.
The better way to do that is to add --build=`../config.guess` to the 
configure script

An also, when building, the compiler need to have a cross gcc and a 
cross ld from the build system to the target.

The solutions i found, wich is not the simpler to build a canadian cross 
compiler with build=sys1 host=sys2 and target=sys3 is to build first a 
cross compiler toolchain for target=sys2, than a cross compiler for 
target=sys3 and finally the canadian cross compiler.


> Hi
>
> I first make a cross compiler to build cygwin program under linux
> binutils:
>     ../configure \
>     --prefix=/bar --enable-libstdcxx_v3 \
>     --target=i686-pc-cygwin --host=i686-pc-linux
> gcc-3.2.3:
>     ../configure \
>     --prefix=/bar \
>     --target=i686-pc-cygwin --host=i686-pc-linux \
>     --enable-haifa --enable-languages=c,c++
> that is working
>
> but after i try to recompile gcc+binutils with this
> binutils:
>     ../configure \
>     --prefix=/barcyg --enable-libstdcxx_v3 \
>     --target=i686-pc-linux-gnu--host=i686-pc-cygwin
>         work well
> gcc-3.2.3:
>     ../configure --prefix=/bar/cyg\
>     --target=i686-pc-linux-gnu --host=i686-pc-cygwin \
>     --enable-haifa --enable-languages=c,c++
>
> and make cross give this error:
> /bin/sh ../../gcc/mkconfig.sh hconfig.h
> i686-pc-cygwin-gcc -c -DIN_GCC -DCROSS_COMPILE   -g -O2 -W -Wall 
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional 
> -pedantic -Wno-long-long  -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. 
> -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include 
> ../../gcc/gengenrtl.c -o gengenrtl.o
> i686-pc-cygwin-gcc -DIN_GCC -DCROSS_COMPILE   -g -O2 -W -Wall 
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional 
> -pedantic -Wno-long-long  -DHAVE_CONFIG_H -DGENERATOR_FILE  -o 
> gengenrtl.exe \
>  gengenrtl.o ../libiberty/libiberty.a
> ./gengenrtl.exe -h > tmp-genrtl.h
> /bin/sh: line 1: ./gengenrtl.exe: cannot execute binary file
> make[1]: *** [s-genrtl] Erreur 126
>
>
>
> Does anyone know how to fix that ?
>
>
> ------
> Want more information?  See the CrossGCC FAQ, 
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to 
> crossgcc-unsubscribe@sources.redhat.com
>
>



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list