added glibc bootstrap build
This commit is contained in:
33
build.sh
33
build.sh
@@ -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
|
||||||
Reference in New Issue
Block a user