lfs/unpack-gcc.sh
2024-12-06 19:04:37 +01:00

21 lines
No EOL
557 B
Bash

if [ ! -d "$LFS_BUILD/gcc" ]; then
tar -xzf "$BASE_DIR/sources/gcc-14.2.0.tar.gz"
mv "gcc-14.2.0" "$LFS_BUILD/gcc"
fi
cd "$LFS_BUILD/gcc/"
tar -xf "$BASE_DIR/sources/mpfr-4.2.1.tar.xz"
mv -v mpfr-4.2.1 mpfr
tar -xf "$BASE_DIR/sources/gmp-6.3.0.tar.xz"
mv -v gmp-6.3.0 gmp
tar -xf "$BASE_DIR/sources/mpc-1.3.1.tar.gz"
mv -v mpc-1.3.1 mpc
# On x86_64 hosts, set the default directory name for 64-bit libraries to “lib”
case $(uname -m) in
x86_64)
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
;;
esac
cd "$BASE_DIR"