This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Cross compilation (fwd)
- To: gcc at gcc dot gnu dot org
- Subject: Cross compilation (fwd)
- From: student <csst9923 at scylla dot cs dot uoi dot gr>
- Date: Sat, 24 Feb 2001 16:33:29 +0200 (EET)
Hi.
I am trying to build a cross compiler from i686-pc-linux-gnu
to a sparc-sun-solaris.
I tried to build it as the Cross compilation FAQ
(http://www.objsw.com/CrossGCC/) suggested but :
- I have managed to build binutils (2.10 or 2.9)
- but when i am compiling gcc-2.95.2 the following error appears :
______________________________________________________________________
rm -f tmplibgcc2.a
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3
_negdi2
_lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2
_ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi
_fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi
_fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb
_shtab _clear_cache _trampoline __main _exit _ctors _pure; \ do \
echo ${name}; \
/root/compile/build-gcc/gcc/xgcc -B/root/compile/build-gcc/gcc/
-B/usr/local/sparc64/sparc-sun-solaris/bin/
-I/usr/local/sparc64/sparc-sun-solaris/include -O2 -DCROSS_COMPILE
-DIN_GCC -DHAIFA -g -O2 -I./include -fPIC -g1 -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I../../gcc-2.95.2/gcc
-I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include -c
-DL${name} \
../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
sparc-sun-solaris-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \ done _muldi3 ../../gcc-2.95.2/gcc/libgcc2.c:41:
stdlib.h: No such file or directory ../../gcc-2.95.2/gcc/libgcc2.c:42:
unistd.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1
________________________________________________________________________
When i copy the file unistd.h and stdlib.h (and their dependencies like
time.h etc.) from /usr/include/ then the compilation succeedes but when i
run sparc-sun-solaris-gcc foo.c then ld says that it cannot find
values-Xa.o .but there is no such file in the system....
When i copy unistd.h from /usr/src/linux/include/asm-sparc/ the
compilation fails...
The point is what include files must pass to the compilation proccess ?
My system runs the 2.4.0 kernel so do i need to pass the headers from the
source of the kernel or from /usr/include , and the unistd.h must be from
the i386 architecture or from the sparc one ?
Please also tell me where i can find help about cross compiling gcc for a
sparc (eg what are the neccesary configure flags for an ultra sparc 5
with solaris7 or for an workstation sparc4 with solaris2.5.1 ? )
Thank you.