"jcnet" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

>> In chapter 6 Glibc will be installed before Binutils is compiled for
>> the last time. Is is only *after* installation of Glibc when the
>> "make install" is executed, so the make command in the
>> binutils-build/ld directory is merely a preparation.
>> It is not really used until chapter 6 after installation of the Glibc
>> package. Everything that is installed in chapter 6 is there to stay,
>> and the /tools directory does not belong in the final LFS system.
> 
> I guess the /use/bin and /bin directory belong to the host system.
> but why LFS change the host system's libraries.
> Am i misunderstand it ? 
> 
> 

Here's a (simplified) explanation of the LFS build process:

We are going to be building our new LFS system on a seperate parition (and 
even possibly a seperate hard drive). As such, when we boot into our new 
LFS system, the old host system will not be available. This means we have 
to make very sure that nothing in our finished LFS system points to or uses 
anything from the host system.

This is achieved by doing a two-stage build. First (Chapter 5), we build a 
compiler, C library, and some other tools required to build the main LFS 
system. We place these packages into the /tools directory, so they are 
seperate from the host system, and we use a symlink ($LFS/tools) so we can 
still see these packages once we are in step 2 (Chapter 6).

In order to make the Chapter 5 build work properly, we change the "ld" 
command (part of binutils) to find system libraries in the /tools/lib 
directory. Once we have done this, we can then build the rest of the 
Chapter 5 packages, ready for the chroot into Chapter 6.

Because we are already in the binutils directory, we also change the 
configuration of "ld" back to /lib:/usr/lib, but we *don't* install the 
changes - we do this later in Chapter 6. This is the reason you are 
instructed to not remove the binutils build and source directories in 
Chapter 5.

We *could* change the "ld" configuration back to /lib:/usr/lib as the last 
step in Chapter 5 - that may be something the editors will consider, in 
order to reduce confusion.

Note that although we install the Chapter 6 "ld" configuration to point to 
/usr:/usr/lib, because we are in a chroot environment, it will actually use 
$LFS/usr:$LFS/usr/lib, so will not interfere with the host system at all.

Clear as mud? ;)

-- -
Steve Crosby
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to