From 687a1b19e88241fe56d4523ea4a038eddc9fe053 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 3 Jan 2024 13:42:34 +0800 Subject: [PATCH] mips64el: gcc: use lib instead of lib64 --- chapter05/gcc-pass1.xml | 13 ++++--------- chapter06/gcc-pass2.xml | 12 ++++-------- chapter08/gcc.xml | 12 ++++-------- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 7f33e5215..c331e0a64 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -62,15 +62,11 @@ mv -v gmp-&gmp-version; gmp tar -xf ../mpc-&mpc-version;.tar.gz mv -v mpc-&mpc-version; mpc - On x86_64 hosts, set the default directory name for + On 64-bit MIPS hosts, set the default directory name for 64-bit libraries to lib: -case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac +sed -e 's/lib64/lib/' \ + -i.orig gcc/config/mips/{mips.h,t-linux64} The GCC documentation recommends building GCC in a dedicated build directory: @@ -159,8 +155,7 @@ cd build --disable-multilib - On x86_64, LFS does not support a multilib configuration. - This switch is harmless for x86. + On 64-bit MIPS, LFS does not support a multilib configuration. diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index 98b28150d..522fb03ab 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -57,15 +57,11 @@ mv -v gmp-&gmp-version; gmp tar -xf ../mpc-&mpc-version;.tar.gz mv -v mpc-&mpc-version; mpc - If building on x86_64, change the default directory name for 64-bit - libraries to lib: + For building on 64-bit MIPS, change the default directory name for + 64-bit libraries to lib: -case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac +sed -e 's/lib64/lib/' \ + -i.orig gcc/config/mips/{mips.h,t-linux64} Override the building rule of libgcc and libstdc++ headers, to allow building these libraries with POSIX threads support: diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 66f803273..5ef8d0814 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -54,15 +54,11 @@ patch -Np1 -i ../&gcc-upstream-fixes-patch; --> - If building on x86_64, change the default directory name for 64-bit - libraries to lib: + For building on 64-bit MIPS, change the default directory name for + 64-bit libraries to lib: -case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac +sed -e 's/lib64/lib/' \ + -i.orig gcc/config/mips/{mips.h,t-linux64} The GCC documentation recommends building GCC in a dedicated build directory: