diff options
Diffstat (limited to 'chapter5')
-rw-r--r-- | chapter5/binutils.sh | 1 | ||||
-rw-r--r-- | chapter5/gcc.sh | 11 | ||||
-rw-r--r-- | chapter5/glibc.sh | 4 | ||||
-rw-r--r-- | chapter5/libstdc++.sh | 1 | ||||
-rw-r--r-- | chapter5/linux-api-headers.sh | 1 |
5 files changed, 17 insertions, 1 deletions
diff --git a/chapter5/binutils.sh b/chapter5/binutils.sh index 2d9da5b..5176d0c 100644 --- a/chapter5/binutils.sh +++ b/chapter5/binutils.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e mkdir build cd build || exit 1 diff --git a/chapter5/gcc.sh b/chapter5/gcc.sh index 52079a4..62768be 100644 --- a/chapter5/gcc.sh +++ b/chapter5/gcc.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e mkdir -p mpfr gmp mpc tar -xf ../mpfr-*.tar.xz -C mpfr --strip-components=1 @@ -10,6 +11,10 @@ case $(uname -m) in sed -e '/m64=/s/lib64/lib/' \ -i.orig gcc/config/i386/t-linux64 ;; + aarch64) + sed -e '/mabi.lp64=/s/lib64/lib/' \ + -i.orig gcc/config/aarch64/t-aarch64-linux + ;; esac mkdir -v build @@ -34,7 +39,11 @@ cd build || exit 1 --disable-libssp \ --disable-libvtv \ --disable-libstdcxx \ - --enable-languages=c,c++ && + --enable-languages=c,c++ \ + "$([ "$(uname -m)" = aarch64 ] && echo --with-arch=armv8-a)" \ + "$([ "$(uname -m)" = aarch64 ] && echo --with-cpu=cortex-a73.cortex-a53)" \ + "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-835769)" \ + "$([ "$(uname -m)" = aarch64 ] && echo --enable-fix-cortex-a53-843419)" && make && make -j1 install && diff --git a/chapter5/glibc.sh b/chapter5/glibc.sh index edab0d3..df39bc9 100644 --- a/chapter5/glibc.sh +++ b/chapter5/glibc.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e case $(uname -m) in i?86) ln -sfv ld-linux.so.2 "${LFS}"/lib/ld-lsb.so.3 @@ -6,6 +7,9 @@ case $(uname -m) in 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 ;; + aarch64) ln -sfv ../lib/ld-linux-aarch64.so.1 "${LFS}"/lib64 + ln -sfv ../lib/ld-linux-aarch64.so.1 "${LFS}"/lib64/ld-lsb-aarch64.so.3 + ;; esac patch -Np1 -i ../glibc-"${VERSION}"-fhs-1.patch && diff --git a/chapter5/libstdc++.sh b/chapter5/libstdc++.sh index d1be7dd..d8cb707 100644 --- a/chapter5/libstdc++.sh +++ b/chapter5/libstdc++.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e mkdir -v build cd build || exit 1 diff --git a/chapter5/linux-api-headers.sh b/chapter5/linux-api-headers.sh index 3111625..41d7cfc 100644 --- a/chapter5/linux-api-headers.sh +++ b/chapter5/linux-api-headers.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e make mrproper && make headers && |