lfs/unpack-gcc.sh
2024-12-08 17:00:20 +01:00

40 lines
908 B
Bash

export GCC_SOURCE_DIR=$1
if [ ! -d "$GCC_SOURCE_DIR/gcc" ]; then
tar -xzf "$BASE_DIR/sources/gcc-14.2.0.tar.gz"
mv "gcc-14.2.0" "$GCC_SOURCE_DIR/gcc"
fi
cd "$GCC_SOURCE_DIR/gcc/"
if [ ! -d "mpfr" ]; then
tar -xf "$BASE_DIR/sources/mpfr-4.2.1.tar.xz"
mv -v mpfr-4.2.1 mpfr
fi
if [ ! -d "gmp" ]; then
tar -xf "$BASE_DIR/sources/gmp-6.3.0.tar.xz"
mv -v gmp-6.3.0 gmp
fi
if [ ! -d "mpc" ]; then
tar -xf "$BASE_DIR/sources/mpc-1.3.1.tar.gz"
mv -v mpc-1.3.1 mpc
fi
if [ ! -d "isl" ]; then
tar -xf "$BASE_DIR/sources/isl-0.27.tar.gz"
mv -v isl-0.27 isl
fi
if [ ! -d "cloog" ]; then
tar -xf "$BASE_DIR/sources/cloog-0.18.4.tar.gz"
mv -v cloog-0.18.4 cloog
fi
# 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