Hi,
I am trying to build a tool-chain for a MIPS based board. My host is x86 (FC3) with gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) Have successfully compiled and installed binutils-2.16.1 gdb6.3 gcc-3.4.4
I intend to build linux kernel 2.6.15 with this and also need to build certain applications. using the following procedure:
---------- export TARGET=mips-unknown-linux-gnu
%$BINUTILS_SRC/configure --prefix=$PREFIX --target=$TARGET %make %make install
%mkdir $PREFIX/include %cp -rf linux-libc-headers-2.6.12.0/include/linux $PREFIX/include %cp -rf linux-libc-headers-2.6.12.0/include/asm-mips $PREFIX/include %ln -s $PREFIX/include/asm-mips $PREFIX/include/asm
%$GCC3.4.4_SRC/configure --target=$TARGET --prefix=$PREFIX
--enable-languages=c --without-headers --disable-shared
--disable-threads %make %make install
%$GDB6.3_SRC/configure --prefix=$PREFIX --target=$TARGET %make %make install
Now I want to build the glibc. I follow the similar process: %$GLIBC_2.3.6_SRC/configure --prefix=$PREFIX --target=$TARGET
--with-headers=$PREFIX/include/ --enable-kernel=2.6.10
--with-binutils=$PREFIX/bin/ --build=mips --host=i586-pc-linux-gnu
--disable-add-ons --disable-sanity-checks %make
The compilation fails with the error:
gcc -B/rolldown/cross_tool/bin/ ../sysdeps/generic/check_fds.c -c
-std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g
-mpreferred-stack-boundary=4 -I../include -I.
-I/rolldown/build/tmp/build-glibc/csu -I.. -I../libio
-I/rolldown/build/tmp/build-glibc -I../sysdeps/i386/elf
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/i386/i586 -I../sysdeps/i386/i486
-I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/lib/gcc/i386-redhat-linux/3.4.2/include -isystem /rolldown/cross_tool/include/ -include ../include/libc-symbols.h
-DHAVE_INITFINI -o /rolldown/build/tmp/build-glibc/csu/check_fds.o -MD
-MP -MF /rolldown/build/tmp/build-glibc/csu/check_fds.o.dt -MT /rolldown/build/tmp/build-glibc/csu/check_fds.o ../sysdeps/generic/check_fds.c: In function `check_one_fd': ../sysdeps/generic/check_fds.c:52: error: `__NR_open' undeclared (first use in this function) ../sysdeps/generic/check_fds.c:52: error: (Each undeclared identifier is reported only once ../sysdeps/generic/check_fds.c:52: error: for each function it appears in.) make[2]: *** [/rolldown/build/tmp/build-glibc/csu/check_fds.o] Error 1 make[2]: Leaving directory `/home/hmohanh/project/rolldown/src/glibc-20051107/csu' make[1]: *** [csu/subdir_lib] Error 2 make[1]: Leaving directory `/home/hmohanh/project/rolldown/src/glibc-20051107' make: *** [all] Error 2
--------- Am I using some wrong configuration options or do I need some other versions of these programs? Are there any mips specific patches required?
I have also tried building with Dan Kegels crosstools0.38, but that too fails at a different point.
Thanks in advance, Hemant