native toolchain build

Sergei Zhirikov sfzhi@yahoo.com
Sat Apr 9 17:52:00 GMT 2011


On 2011-04-09 17:50, Michael Zintakis wrote:
> Yann,
>
> So, to clarify, I need to have this (arrows - "->" - means "built by"):
>
> Toolchain0 -> Toolchain1 -> Toolchain2 -> Toolchain3
>
> Toolchain0 (x86_64->x86_64) - the toolchain already present on the build machine. This, to me, is not pure as it may be "polluted" by distro-specific "peculiarities", so I can't really rely on it apart from building a "native" toolchain (see Toolchain1 below).
>
> Toolchain1 (x86_64->x86_64) - this toolchain which is also native (to the build machine), but is built from scratch and independent from anything else present on the build machine to ensure the code is in "pure" form. This is what I am struggling with at present, hence the start of this thread.
>
> Toolchain2 (x86_64->i3/4/5/686 or powerpc (G2-G5)) - my cross toolchain - this is already built and works as expected (in fact, I am so far very pleased with what I've got out of it!). To make things simple I am currently only experimenting with the i686 branch to iron things out first before switching to ppc.
>
> Toolchain3 (i3/4/5/686 or powerpc (G2-G5)->i3/4/5/686 or powerpc (G2-G5)) - "cross-native" - this is "partially" built in a sense that I have used the libraries present in the Toolchain2's sysroot directory and then built GCC on top of it. Tested it (albeit not thoroughly) and it works. The main purpose will be to be able to compile and run code for the target arch on the target arch only!
>
> It is also worth noting that when I did build the whole thing I've specifically created a symlink called "/tools" (i.e. directory called "tools" on my real root of the build system) pointing to ~/distrib/tools and all prefixes of that toolchain reference "/tools" (as in the symlink) - this will aide me later on when I enter the chroot environment as that prefix won't change!
>

Michael,

No offense, but it seems to me that you are trying to re-invent the wheel. LFS (http://www.linuxfromscratch.org) does almost exactly what you want to do (except building the toolchains 2 and 3), so why don't you just follow that manual up to the point when you can start building Toolchain2 (somewhere in the beginning of Chapter 6)?

--
Sergei,




--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list