aboutsummaryrefslogtreecommitdiffstats
path: root/chapter6/gcc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chapter6/gcc.sh')
-rw-r--r--chapter6/gcc.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/chapter6/gcc.sh b/chapter6/gcc.sh
index adf4593..881d200 100644
--- a/chapter6/gcc.sh
+++ b/chapter6/gcc.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
mkdir -p isl mpfr gmp mpc
tar -xf ../isl-*.tar.xz -C isl --strip-components=1
tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1
@@ -11,16 +13,16 @@ case $(uname -m) in
esac
mkdir -v build
-cd build
+cd build || exit 1
-mkdir -pv ${LFS_TGT}/libgcc &&
-ln -s ../../../libgcc/gthr-posix.h ${LFS_TGT}/libgcc/gthr-default.h &&
+mkdir -pv "${LFS_TGT}"/libgcc &&
+ln -s ../../../libgcc/gthr-posix.h "${LFS_TGT}"/libgcc/gthr-default.h &&
../configure \
- --build=$(../config.guess) \
- --host=${LFS_TGT} \
+ --build="$(../config.guess)" \
+ --host="${LFS_TGT}" \
--prefix=/usr \
- CC_FOR_TARGET=${LFS_TGT}-gcc \
- --with-build-sysroot=${LFS} \
+ CC_FOR_TARGET="${LFS_TGT}"-gcc \
+ --with-build-sysroot="${LFS}" \
--enable-initfini-array \
--disable-nls \
--disable-multilib \
@@ -33,5 +35,5 @@ ln -s ../../../libgcc/gthr-posix.h ${LFS_TGT}/libgcc/gthr-default.h &&
--disable-libstdcxx \
--enable-languages=c,c++ &&
make &&
-make DESTDIR=${LFS} -j1 install &&
-ln -sv gcc ${LFS}/usr/bin/cc
+make DESTDIR="${LFS}" -j1 install &&
+ln -sv gcc "${LFS}"/usr/bin/cc