cross-ng: chapter 5: gcc: don't rely on uname -m

This commit is contained in:
Xi Ruoyao 2021-12-17 20:09:28 +08:00
parent 30ae09bb76
commit db51ee9325
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC

View File

@ -45,12 +45,14 @@
<para>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:</para>
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.</para>
<screen><userinput remap="pre">case $(uname -m) in
i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3
<screen><userinput remap="pre">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
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</userinput></screen>