Building mips cross compiler with 2.95.4
Hello,
I unsuccessfully tried to make a x-compiler for mips with 2.95.4
I tried various approaches, as follows.
I have binutils cross compiled via toolchain-source and installed
the .deb, so they are available in the normal PATHes and seems to
be used.
I applied debian/rules patches, afterwards cd src-native/ ran
./configure --target=mips-linux --enable-languages=c afterwards
make and the outcome was:
/home/othmar/gcc/gcc-2.95-2.95.4.ds15/src-native/gcc/xgcc
-B/home/othmar/gcc/gcc-2.95-2.95.4.ds15/src-native/gcc/
-B/usr/local/mips-linux/bin/ -I/usr/local/mips-linux/include -O2
-DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -g1
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I./config
-I./../include -c -DL${name} \
./libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
mips-linux-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
./libgcc2.c:41: stdlib.h: No such file or directory
./libgcc2.c:42: unistd.h: No such file or directory
make[1]: *** [libgcc2.a] Fehler 1
make[1]: Verlasse Verzeichnis
»/home/othmar/gcc/gcc-2.95-2.95.4.ds15/src-native/gcc«
adding an -I/usr/mips-linux/include gives me a nice
In file included from /usr/mips-linux/include/sys/types.h:31,
from /usr/mips-linux/include/stdlib.h:416,
from ./libgcc2.c:41:
/usr/mips-linux/include/bits/types.h:127: #error
make[1]: *** [libgcc2.a] Fehler 1
do I miss something here?
I also tried with --with-newlib which resulted in
/home/othmar/gcc/gcc-2.95-2.95.4.ds15/src-native/gcc/xgcc
-B/home/othmar/gcc/gcc-2.95-2.95.4.ds15/src-native/gcc/
-B/usr/local/mips-linux/bin/ -I/usr/local/mips-linux/include -O2
-DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -g1
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I./config -I./../include -c -DL${name} \
./libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
mips-linux-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
as: Unbekannte Option »-O2«
make[1]: *** [libgcc2.a] Fehler 1
make[1]: Verlasse Verzeichnis
»/home/othmar/gcc/gcc-2.95-2.95.4.ds15/src-native/gcc«
So is there someone out there which can enlighten me what I might
have done wrong? Or what concept I didn't know which would make
this compile successful?
TIA
Othmar
Reply to: