From db51ee93257aa1023f7637505590b2cddfb12a1a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 17 Dec 2021 20:09:28 +0800 Subject: [PATCH] cross-ng: chapter 5: gcc: don't rely on uname -m --- chapter05/glibc.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 5c4e27119..166be911c 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -45,13 +45,15 @@ First, create a symbolic link for LSB compliance. Additionally, for x86_64, create a compatibility symbolic link required for proper - operation of the dynamic library loader: + operation of the dynamic library loader. It's needed to adjust the + command if you are building LFS for a target other than 32-bit or + 64-bit x86. -case $(uname -m) in - i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3 +case $LFS_TGT 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 + 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