Why building Toolchain

Mike McCarty Mike.McCarty at sbcglobal.net
Wed Oct 14 06:19:22 PDT 2009


Amir Khezrian wrote:
> hello
> 
> I have some questions about the procedure of making LFS system?
> I have not undrestood why we need toolchain to build the actual LFS system .
> If the reason for building toolchain is just the tools that we need to build
> the LFS system, like compiler ,Why we don't use the host system's tools ?
> And is it possible to use the host system's tools to building actual LFS
> system ,instead of building a toolchain or creating new environment?

What you suggest would result in a sort of "hybrid" system, partly
LFS and partly the host distribution. This is undesirable for a
number of reasons, not just some sort of adherence to LFS "purity".

After you get your system built, you'd like to be able to use it
to build add ons and other stuff. That means it needs its own
tool set. That tool set needs to produce identical output to
the one used to build the system, or you'll get (possibly)
incompatibilities.

As a not so contrived example, consider the case of building for
a machine which can be run either in 32 bit mode, or in 64 bit
mode. If one uses a 32 bit mode host distribution, and uses its
tools, then the built system will also have this constraint
built into it. If, on the other hand, one builds a temporary
tool set which produces 64 bit images, then the built system
can run in 64 bit mode.

As an even more extreme example, suppose you want to build on
an Intel architecture machine an image which can be booted and
run on a Mac or PPC. Clearly, in this case, you do not want simply
to use the host compiler.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!



More information about the lfs-support mailing list