lfs-scripts/scripts/chapter5/5.5-glibc.sh

48 lines
929 B
Bash
Raw Normal View History

2023-01-08 10:07:41 +00:00
#!/bin/bash
cd $LFS/sources
tar xf glibc-2.36.tar.xz
cd glibc-2.36
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
patch -Np1 -i ../glibc-2.36-fhs-1.patch
mkdir -v build
cd build
echo "rootsbindir=/usr/sbin" > configparms
../configure \
--prefix=/usr \
--host=$LFS_TGT \
--build=$(../scripts/config.guess) \
--enable-kernel=3.2 \
--with-headers=$LFS/usr/include \
libc_cv_slibdir=/usr/lib
if [ $? -ne 0]
then
exit 1
fi
make -j5
if [ $? -ne 0]
then
exit 1
fi
sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd
$LFS/tools/libexec/gcc/$LFS_TGT/12.2.0/install-tools/mkheaders
2023-01-08 10:13:27 +00:00
cd $LFS/sources
rm -rf glibc-2.36