2.4. Glibc 2.43

The main C library provides basic routines for allocating memory, searching directories, opening and closing files, reading and writing files, string handling, pattern matching, arithmetic, and so on.

Package Information

Glibc Dependencies

Required

Binutils-2.46.0-pass1, GCC-15.2.0-pass1, and Linux-7.0.3-headers

2.4.1. Installation of Glibc

Prepare Glibc for compilation:

Patch a vulnerability, issue:

patch -Np1 -i ../glibc-fhs-1.patch

Patch an issue with Linux 7.0, issue:

patch -Np1 -i ../glibc-macro-guard.patch

Now Configure the Package, issue:

case $(uname -m) in
    i?86)   ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
    ;;
    x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
            ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3
    ;;
esac

Now Coonfigure the Package, issue:

mkdir -v build
cd build
echo "rootsbindir=/usr/sbin" > configparms

../configure --prefix=/usr \
             libc_cv_slibdir=/usr/lib \
             --build=$(../scripts/config.guess) \
             --enable-kernel=5.4 \
             --host=$LFS_TGT \
             --disable-nscd

To Compile the Package, issue:

make

Now Install the Package, issue:

make DESTDIR=$LFS install;
sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd

2.4.2. Contents of Glibc

Installed programs: PROGRAMS
Installed libraries: LIBRARIES
Installed directories: DIRECTORIES