Tomasz Chmielewski wrote:
I'm trying to cross-compile gcc to work on mipsel / uClibc, to run there
natively (that is, I want to compile on this mipsel / uClibc machine).
So far I have a cross compiler that builds binaries for mipsel/uClibc on
a x86 machine.
According to crosstool HOWTO, "to do a Canadian Cross build with
crosstool, you have to run it three times:
1. once to build a toolchain that runs on the build system and
generates code for the host system
2. once to build a toolchain that runs on the build system and
generates code for the target system
3. once to build a toolchain that runs on the host system and
generates code for the target system".
So I guess the first step is behind me, but I'm not sure how to do steps
2 and 3.
Anyone knows how to do it?
Or perhaps, there are already gcc binaries available for mipsel / uClibc?
I have done it for mipsel-linux-glibc, however until last week gcc had
no support for uClibc, so it will probably not work with uClibc without
some patching to gcc.
The basic idea is that once you have a working cross toolchain just
configure gcc and binutils with: --build=i686-pc-linux-glibc
--target=mipsel-linux --host=mipsel-linux. This will produce a native
toolchain. You will have to copy the compile time portions of the C
library (include files and link time libraries) to the target, then you
should be all set.
David Daney.