Reason for Chapter 5

support support at
Thu Feb 5 08:33:08 PST 2009

Scott wrote:
> On Wed, Feb 04, 2009 at 04:11:26PM -0800, Rob Thornton wrote:
>> GCC is used to build software. Correct. So, any software you compile on 
>> your own system will work just fine. However, you are in essence, 
>> compiling software on YOUR system (host) for ANOTHER system (target). 
>> When compiling software with the host's gcc, that software will be 
>> linked against the host's libraries. This pollutes the toolchain because 
>> many of these links are hard-wired and can't be changed. So, when you 
>> remove the host and move into the chroot'd environment or try to boot 
>> the new system, you will run into all kinds of issues. 
> Yes, but the OP asks the interesting question: What if the host system
> is, say, lfs 6.1 and you want to build 6.4. Can Chapter 5 be skipped,
> and if not, then why not?
> scott swanson

I guess mileage may vary on this.  GCC is built against Glibc which is
built against the kernel headers for the target, assuming your system
update is using new headers and glibc versions you may face various
compile and runtime issues with the resulting binaries if no sanitised
platform was used because of the likely dependence on instructions from
original code which compiled against libraries no longer in use.  So
based on my guess you'd have to do a fair bit of a build to work out if
it was going to go OK or not, based on the wasted time for the 'not'
scenario, its probably just easier to build a clean toolchain to work
from and remove the hassle.

Of course, I could be way off, in which case please share your thoughts,
I'm always up for grasping things better too.



More information about the lfs-support mailing list