making a cross-compiler from gcc
Posted: Sun Apr 04, 2004 8:03 am
I've been messing around with this for some time now, and somehow it just won't work. I've set the target right and everything, tried some stuff, but it keeps on compiling both ada code, java code & it tries to build libraries for the new target, which doesn't have any library so it complains about missing pthreads and stuff like that. I've followed the cross-compiler-making route of the osfaq literally, except for the first target. Targets tried are x86_64-pc-linux and i686-pc-linux. Does anybody know how to fix this?
[edit] the errors are added [/edit]
The exact errors:
i686 target:
x86_64 version:
Both are being compiled on a i686-pc-linux for a i586-pc-linux (laptop) with these targets. I believe this is called a canadian cross.
[edit] the errors are added [/edit]
The exact errors:
i686 target:
Code: Select all
/usr/src/build-gcc-i686/gcc/xgcc -B/usr/src/build-gcc-i686/gcc/ -B/usr/cross/i686-pc-linux/bin/ -B/usr/cross/i686-pc-linux/lib/ -isystem /usr/cross/i686-pc-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.3.2/gcc
-I../../gcc-3.3.2/gcc/. -I../../gcc-3.3.2/gcc/config -I../../gcc-3.3.2/gcc/../include -DL_muldi3 -c ../../gcc-3.3.2/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from tconfig.h:23,
from ../../gcc-3.3.2/gcc/libgcc2.c:36:
../../gcc-3.3.2/gcc/config/i386/linux.h:232:20: signal.h: No such file or directory
../../gcc-3.3.2/gcc/config/i386/linux.h:233:26: sys/ucontext.h: No such file or
directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/usr/src/build-gcc-i686/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/usr/src/build-gcc-i686/gcc'
make: *** [all-gcc] Error 2
root@michael:/usr/src/build-gcc-i686#
Code: Select all
/usr/src/build-gcc/gcc/xgcc -B/usr/src/build-gcc/gcc/ -B/usr/cross/x86_64-pc-linux/bin/ -B/usr/cross/x86_64-pc-linux/lib/ -isystem /usr/cross/x86_64-pc-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -DNATIVE_CROSS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.3.2/gcc -I../../gcc-3.3.2/gcc/. -I../../gcc-3.3.2/gcc/config -I../../gcc-3.3.2/gcc/../include -fexceptions -c ../../gcc-3.3.2/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from ../../gcc-3.3.2/gcc/unwind-dw2.c:26:
../../gcc-3.3.2/gcc/unwind-pe.h: In function `size_of_encoded_value':
../../gcc-3.3.2/gcc/unwind-pe.h:76: warning: implicit declaration of function `abort'
In file included from gthr-default.h:1,
from ../../gcc-3.3.2/gcc/gthr.h:98,
from ../../gcc-3.3.2/gcc/unwind-dw2.c:28:
../../gcc-3.3.2/gcc/gthr-posix.h:37:21: pthread.h: No such file or directory
../../gcc-3.3.2/gcc/gthr-posix.h:38:20: unistd.h: No such file or directory
In file included from gthr-default.h:1,
from ../../gcc-3.3.2/gcc/gthr.h:98,
from ../../gcc-3.3.2/gcc/unwind-dw2.c:28:
../../gcc-3.3.2/gcc/gthr-posix.h: At top level:
<snap about 200 lines of errors>
../../gcc-3.3.2/gcc/unwind-dw2.c:1223: error: `once_regsizes' undeclared (first
use in this function)
../../gcc-3.3.2/gcc/unwind-dw2.c:1237: warning: implicit declaration of function `memcpy'
make[2]: *** [libgcc/./unwind-dw2.o] Error 1
make[2]: Leaving directory `/usr/src/build-gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/src/build-gcc/gcc'
make: *** [all-gcc] Error 2
root@michael:/usr/src/build-gcc#