added glibc bootstrap build

This commit is contained in:
ag-tsotetsi
2026-02-19 23:19:06 +02:00
parent e34fdc00f5
commit 218750e035

View File

@@ -145,6 +145,37 @@ bootstap_linux() {
cd "$SOURCES" && rm -rf linux-$LINUX_VERSION cd "$SOURCES" && rm -rf linux-$LINUX_VERSION
} }
bootstap_glibc() {
fetch $GLIBC_URL
fetch https://www.linuxfromscratch.org/patches/lfs/development/glibc-fhs-1.patch
cd "$SOURCES" && tar xf glibc-$GLIBC_VERSION.tar.xz && cd glibc-$GLIBC_VERSION
ln -sf ld-linux-x86-64.so.2 "$SYSROOT"/lib/ld-lsb-x86-64.so.3
patch -Np1 -i "$SOURCES"/glibc-fhs-1.patch
mkdir -p build && cd build
echo "rootsbindir=/usr/sbin" > configparms
../configure \
--prefix=/usr \
--host=$TARGET \
--build=$(../scripts/config.guess) \
--disable-nscd \
--disable-nls \
libc_cv_slibdir=/usr/lib \
--enable-kernel=$LINUX_VERSION
make && make DESTDIR="$SYSROOT" install
sed '/RTLDLIST=/s@/usr@@g' -i "$SYSROOT"/usr/bin/ldd
cd "$SOURCES" && rm -rf gcc-$GLIBC_VERSION
}
#bootstrap_binutils #bootstrap_binutils
#bootstap_gcc #bootstap_gcc
bootstap_linux #bootstap_linux
bootstap_glibc