diff options
Diffstat (limited to 'chapter5')
-rw-r--r-- | chapter5/binutils.sh | 26 | ||||
-rw-r--r-- | chapter5/gcc.sh | 90 | ||||
-rw-r--r-- | chapter5/glibc.sh | 68 | ||||
-rw-r--r-- | chapter5/libstdc++.sh | 34 | ||||
-rw-r--r-- | chapter5/linux-api-headers.sh | 16 |
5 files changed, 117 insertions, 117 deletions
diff --git a/chapter5/binutils.sh b/chapter5/binutils.sh index 5176d0c..32246d8 100644 --- a/chapter5/binutils.sh +++ b/chapter5/binutils.sh @@ -1,13 +1,13 @@ -#!/bin/bash -set -e - -mkdir build -cd build || exit 1 - -../configure --prefix="${LFS}"/tools \ - --with-sysroot="${LFS}" \ - --target="${LFS_TGT}" \ - --disable-nls \ - --disable-werror && -make && -make -j1 install +#!/bin/bash
+set -e
+
+mkdir build
+cd build || exit 1
+
+../configure --prefix="${LFS}"/tools \
+ --with-sysroot="${LFS}" \
+ --target="${LFS_TGT}" \
+ --disable-nls \
+ --disable-werror &&
+make &&
+make -j1 install
diff --git a/chapter5/gcc.sh b/chapter5/gcc.sh index 84879c5..a7a2d6c 100644 --- a/chapter5/gcc.sh +++ b/chapter5/gcc.sh @@ -1,45 +1,45 @@ -#!/bin/bash -set -e - -mkdir -p mpfr gmp mpc -tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1 -tar -xf ../gmp-*.tar.xz -C gmp --strip-components=1 -tar -xf ../mpc-*.tar.gz -C mpc --strip-components=1 - -case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac - -mkdir -v build -cd build || exit 1 - -../configure \ - --target="${LFS_TGT}" \ - --prefix="${LFS}"/tools \ - --with-glibc-version=2.11 \ - --with-sysroot="${LFS}" \ - --with-newlib \ - --without-headers \ - --enable-initfini-array \ - --disable-nls \ - --disable-shared \ - --disable-multilib \ - --disable-decimal-float \ - --disable-threads \ - --disable-libatomic \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libssp \ - --disable-libvtv \ - --disable-libstdcxx \ - --enable-languages=c,c++ && - -make && -make -j1 install && - -cd .. -cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ - "$(dirname "$("${LFS_TGT}"-gcc -print-libgcc-file-name)")"/install-tools/include/limits.h +#!/bin/bash
+set -e
+
+mkdir -p mpfr gmp mpc
+tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1
+tar -xf ../gmp-*.tar.xz -C gmp --strip-components=1
+tar -xf ../mpc-*.tar.gz -C mpc --strip-components=1
+
+case $(uname -m) in
+ x86_64)
+ sed -e '/m64=/s/lib64/lib/' \
+ -i.orig gcc/config/i386/t-linux64
+ ;;
+esac
+
+mkdir -v build
+cd build || exit 1
+
+../configure \
+ --target="${LFS_TGT}" \
+ --prefix="${LFS}"/tools \
+ --with-glibc-version=2.11 \
+ --with-sysroot="${LFS}" \
+ --with-newlib \
+ --without-headers \
+ --enable-initfini-array \
+ --disable-nls \
+ --disable-shared \
+ --disable-multilib \
+ --disable-decimal-float \
+ --disable-threads \
+ --disable-libatomic \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --disable-libssp \
+ --disable-libvtv \
+ --disable-libstdcxx \
+ --enable-languages=c,c++ &&
+
+make &&
+make -j1 install &&
+
+cd ..
+cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
+ "$(dirname "$("${LFS_TGT}"-gcc -print-libgcc-file-name)")"/install-tools/include/limits.h
diff --git a/chapter5/glibc.sh b/chapter5/glibc.sh index 7f52023..a304af0 100644 --- a/chapter5/glibc.sh +++ b/chapter5/glibc.sh @@ -1,34 +1,34 @@ -#!/bin/bash -set -e - -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-"${VERSION}"-fhs-1.patch && - -mkdir -v build -cd build || exit 1 - -../configure \ - --prefix=/usr \ - --host="${LFS_TGT}" \ - --build="$(../scripts/config.guess)" \ - --enable-kernel=5.10.0 \ - --with-headers="${LFS}"/usr/include \ - libc_cv_slibdir=/lib && - -make PARALLELMFLAGS="${MAKEFLAGS}" && -make DESTDIR="${LFS}" install && - -echo 'int main(){}' > dummy.c && -"${LFS_TGT}"-gcc dummy.c && -readelf -l a.out | grep '/ld-linux' && - -rm -v dummy.c a.out && - -"${LFS}"/tools/libexec/gcc/"${LFS_TGT}"/10.3.0/install-tools/mkheaders +#!/bin/bash
+set -e
+
+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-"${VERSION}"-fhs-1.patch &&
+
+mkdir -v build
+cd build || exit 1
+
+../configure \
+ --prefix=/usr \
+ --host="${LFS_TGT}" \
+ --build="$(../scripts/config.guess)" \
+ --enable-kernel=5.10.0 \
+ --with-headers="${LFS}"/usr/include \
+ libc_cv_slibdir=/lib &&
+
+make PARALLELMFLAGS="${MAKEFLAGS}" &&
+make DESTDIR="${LFS}" install &&
+
+echo 'int main(){}' > dummy.c &&
+"${LFS_TGT}"-gcc dummy.c &&
+readelf -l a.out | grep '/ld-linux' &&
+
+rm -v dummy.c a.out &&
+
+"${LFS}"/tools/libexec/gcc/"${LFS_TGT}"/10.3.0/install-tools/mkheaders
diff --git a/chapter5/libstdc++.sh b/chapter5/libstdc++.sh index d8cb707..3078aa5 100644 --- a/chapter5/libstdc++.sh +++ b/chapter5/libstdc++.sh @@ -1,17 +1,17 @@ -#!/bin/bash -set -e - -mkdir -v build -cd build || exit 1 - -../libstdc++-v3/configure \ - --host="${LFS_TGT}" \ - --build="$(../config.guess)" \ - --prefix=/usr \ - --disable-multilib \ - --disable-nls \ - --disable-libstdcxx-pch \ - --with-gxx-include-dir=/tools/"${LFS_TGT}"/include/c++/"${VERSION}" && - -make && -make -j1 DESTDIR="${LFS}" install +#!/bin/bash
+set -e
+
+mkdir -v build
+cd build || exit 1
+
+../libstdc++-v3/configure \
+ --host="${LFS_TGT}" \
+ --build="$(../config.guess)" \
+ --prefix=/usr \
+ --disable-multilib \
+ --disable-nls \
+ --disable-libstdcxx-pch \
+ --with-gxx-include-dir=/tools/"${LFS_TGT}"/include/c++/"${VERSION}" &&
+
+make &&
+make -j1 DESTDIR="${LFS}" install
diff --git a/chapter5/linux-api-headers.sh b/chapter5/linux-api-headers.sh index 41d7cfc..6bc7e9c 100644 --- a/chapter5/linux-api-headers.sh +++ b/chapter5/linux-api-headers.sh @@ -1,8 +1,8 @@ -#!/bin/bash -set -e - -make mrproper && -make headers && -find usr/include -name '.*' -delete && -rm usr/include/Makefile && -cp -rv usr/include "${LFS}"/usr +#!/bin/bash
+set -e
+
+make mrproper &&
+make headers &&
+find usr/include -name '.*' -delete &&
+rm usr/include/Makefile &&
+cp -rv usr/include "${LFS}"/usr
|