echo -e "I: -- The installer is creating a symbolic link for LSB compliance. Depending on architecture, it may also create a compatibility symbolic link for proper operation of the dynamic library loader. --"
echo -e "I: -- The installer is now patching glibc. --"
mkdir -v build
cd build
echo"rootsbindir=/usr/sbin" > configparms
eal.notification.buildconf
../configure \
--prefix=/usr \
--host=$LFS_TGT\
--build=$(../scripts/config.guess)\
--enable-kernel=4.19 \
--with-headers=$LFS/usr/include \
--disable-nscd \
libc_cv_slibdir=/usr/lib
eal.notification.compiling
make
eal.emergencyAlert
echo -e "\033[0;31mW: -- Before installing the package, make sure that the variable LFS is CORRECTLY SET to have the value of the target LFS system. If it doesn't, and you're running this script as root, despite the recommendations, this will install the newly built glibc to the HOST SYSTEM, rendering it almost certainly unusable. Please make sure that this variable is correctly set: --"
echo -e "\$LFS: ${LFS}"
echo -e "If this is incorrect, exit the installer immediately by pressing CTRL + C, wipe the target LFS partition and restart the entire installation process. If the variable is correct, press Enter"
read
eal.notification.installing
make DESTDIR=$LFS install
sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd
echo"I: -- The next output you'll receive needs to start with \"[Requesting program interpreter:\". If the output is not similar to this, or not shown at all, something is wrong. Please confirm that there is an output by pressing enter. If the output is wrong, type \"R\" without the quotation marks to drop into the shell. --"
echo'int main(){}'|$LFS_TGT-gcc -xc -
readelf -l a.out | grep ld-linux
read -p "->" TEMP_OUTPUT
case"$TEMP_OUTPUT" in
R)
echo"Fix issues by checking the LFS 12.2-systemd book. Once you fixed everything, clean up the test file by running \"rm -v a.out\"."