diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-23 13:17:02 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-23 13:17:02 -0500 |
commit | 66d4171655e0b93766c82f50ce06521f85b58222 (patch) | |
tree | 1b6d1cbcbc169e5cbb4e6ea6698ed91d82d7cc88 /chapter5/glibc.sh | |
parent | 9d68d5da4115353816ab4f6b1c7a4f5db43576f9 (diff) | |
parent | 887bf450c01c511a3f6d048d3db78e8edfb21e8a (diff) |
Merge branch 'master' into chapter7
Diffstat (limited to 'chapter5/glibc.sh')
-rw-r--r-- | chapter5/glibc.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/chapter5/glibc.sh b/chapter5/glibc.sh index 875e633..54db90a 100644 --- a/chapter5/glibc.sh +++ b/chapter5/glibc.sh @@ -1,31 +1,33 @@ +#!/bin/bash + case $(uname -m) in - i?86) ln -sfv ld-linux.so.2 ${LFS}/lib/ld-lsb.so.3 + 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 + 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-2.33-fhs-1.patch && mkdir -v build -cd build +cd build || exit 1 ../configure \ --prefix=/usr \ - --host=${LFS_TGT} \ - --build=$(../scripts/config.guess) \ + --host="${LFS_TGT}" \ + --build="$(../scripts/config.guess)" \ --enable-kernel=4.10.0 \ - --with-headers=${LFS}/usr/include \ + --with-headers="${LFS}"/usr/include \ libc_cv_slibdir=/lib && make PARALLELMFLAGS="${MAKEFLAGS}" && -make DESTDIR=${LFS} install && +make DESTDIR="${LFS}" install && echo 'int main(){}' > dummy.c && -${LFS_TGT}-gcc 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.2.0/install-tools/mkheaders +"${LFS}"/tools/libexec/gcc/"${LFS_TGT}"/10.2.0/install-tools/mkheaders |