From 218750e03522dd940615e93709c015f7a6502c86 Mon Sep 17 00:00:00 2001 From: ag-tsotetsi Date: Thu, 19 Feb 2026 23:19:06 +0200 Subject: [PATCH] added glibc bootstrap build --- build.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 125954f..7f4edac 100755 --- a/build.sh +++ b/build.sh @@ -145,6 +145,37 @@ bootstap_linux() { 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 #bootstap_gcc -bootstap_linux \ No newline at end of file +#bootstap_linux +bootstap_glibc \ No newline at end of file