building native cross compiler

Michael Zintakis michael.zintakis@googlemail.com
Mon Mar 14 19:25:00 GMT 2011


> Are you really
> seriously trying to reproduce all this glibc, X11, Gnome etc. target
> stuff?
What I am trying to do is produce (i.e. compile from source) a 
pre-selected software bundle to a pre-defined target arch without using 
the various distributors binaries. I know I could easily grab some 
random binary toolchain, copy it to my temporary sysroot and just start 
the building process (hell, I could even use kickstart), but that is not 
what I am after.

> Can one simply copy these from some existing "similar" (to
> the becoming target) system?
As I already pointed out - that is not an option for me.

>   Or is that "heretic"?  Is one allowed to
> use the existing native GCC to produce the GCC1?
Yes, that is precisely how I plan to do it - GCC1 will be bootstrapped 
and properly tested and used as a base to build GCC2 and then the rest 
of the software image.

> So the BIG question is : "Are you allowed to produce a complete and
> working GCC2 which has a prebuilt temporary glibc as the target glibc
> in some stage?" The process would be :
>
> 1. make binutils for the target
> 2. copy a temporary glibc for the target
Step 2 above is not an option.

> 3. make GCC for the target
> 4. make the final glibc for the target with the step 3 GCC and
>    overwrite the temporary glibc
>
> Trying to avoid the step 2 in a LFS case although the GCC build
> expects the target C library being already there, is just what
> the "crosstool" process is for... And is equivalent to the problem
> "Can I borrow a knife from a neighbour or buy a knife if I want to
> make my own self-made knife?" Producing the wooden handle for the
> knife without a knife could sound quite hard :(
Well, if it was easy I won't be coming on this mailing list asking for 
help, would I? ;-)

I am sure this has come up before (not just on this mailing list), so a 
solution simply *must* exist. I am currently looking through the 
crosstool scripts to see whether I could use something from them to 
resolve this.




More information about the Gcc-help mailing list