Hi list, Happy New Year!
I've been confused for a while about building a cross gcc from nothing. The target platform of this requested gcc and glibc is mipsel-linux.
I googled a lot and had a conclusion. It seems that I need to build a (minimal) cross gcc first, and use this gcc to build glibc, then build a complete cross gcc. (Is that right?)
So I built binutils-2.15 first and installed into /usr/local/mipsel/target first. Then I configured gcc as follows:
<shell command> ../gcc-3.2.3/configure --prefix=/usr/local/mipsel/target \ --host=i586-mandrake-linux-gnu --target=mipsel-linux --enable-languages=c \ --with-cpu=mipsel-linux --disable-threads </shell command>
(I used gcc-3.2.3 because I need to compile linux-2.4.18 for mips... It seemed not a good idea to compile with gcc-3.3 or above.)
I used --disable-threads because it will ask for pthread.h, and at that time glibc had not been built yet.
After successfully configured, I typed:
make bootstrap
Do a make and not a bootstrap. Bootstrap tries to build GCC again with the GCC that has been built in the first stage. Further a bootstrap does not make sense for a cross compiler since the executables that the cross compiler would generate would be for mipsel-linux and not for i386-linux which is where I expect you would want your cross compiler to be running.
Also you could take a look at crosstool at www.kegel.com which is a useful set of scripts to build cross compilers.
cheers Ramana