Reputation: 45
I followed the LFS's insturctions and all of it seems to work properly yet. But i got confused when it comes to the second time of installation of the glibc after entering the chroot environment. My question is:
There is a glibc already compiled when building the cross-toolchain, and i assume all the codes inside that glibc should run on the lfs machine since the build process is configured with the parameter "--host=$LFS_TGT", if my assumption is right, then why do i need to build the glibc in the chroot environment again?
Here are the configure instructions used when building both glibc.
#compiling the cross-toolchain
../configure \
--prefix=/usr \
--host=$LFS_TGT \
--build=$(../scripts/config.guess) \
--enable-kernel=3.2 \
--with-headers=$LFS/usr/include \
libc_cv_slibdir=/lib
#in the chroot environment
../configure --prefix=/usr \
--disable-werror \
--enable-kernel=3.2 \
--enable-stack-protector=strong \
--with-headers=/usr/include \
libc_cv_slibdir=/lib
Thank you!
Upvotes: 0
Views: 36