diff --git a/scripts/chapter5/5.2-binutils.sh b/scripts/chapter5/5.2-binutils.sh new file mode 100644 index 0000000..5824e22 --- /dev/null +++ b/scripts/chapter5/5.2-binutils.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +mkdir -v build +cd build + +../configure --prefix=$LFS/tools \ + --with-sysroot=$LFS \ + --target=$LFS_TGT \ + --disable-nls \ + --enable-gprofng=no \ + --disable-werror + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make install + diff --git a/scripts/main.sh b/scripts/main.sh index c3a7d7c..7a56c63 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -121,10 +121,23 @@ PWD=$(pwd) echo "Setting Up the Environment" su - lfs -c "$PWD/chapter4/4.4-set-up-env.sh" - # Exit on error check_exit_code if [ $exit_status -ne 0 ] then stop_script "chapter4/4.4-set-up-env.sh" fi + +# Chapter 5.2 +# =========== +echo "Building binutils" +su - lfs -c "$PWD/chapter5/5.2-binutils.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter5/5.2-binutils.sh" +fi + +