From f5c3bf6e7e18f5dbb5af6da7f516187ce549aae5 Mon Sep 17 00:00:00 2001 From: "Thomas Trepl (Moody)" Date: Thu, 13 May 2021 18:30:55 +0200 Subject: [PATCH 1/3] Use a configuration option to set the loader pathes in ldd --- chapter05/glibc.xml | 15 ++++++++++++--- chapter08/glibc.xml | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 02ff025e2..8a28e4546 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -80,7 +80,8 @@ cd build --build=$(../scripts/config.guess) \ --enable-kernel=&min-kernel; \ --with-headers=$LFS/usr/include \ - libc_cv_slibdir=/usr/lib + libc_cv_slibdir=/usr/lib \ + libc_cv_rtlddir=/lib The meaning of the configure options: @@ -121,6 +122,14 @@ cd build + + libc_cv_rtlddir=/lib + + Fix hardcoded path to the executable loader in the + ldd script. + + + @@ -184,12 +193,12 @@ cd build - + At this point, it is imperative to stop and ensure that the basic functions (compiling and linking) of the new toolchain are working as diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 8efd2ca90..16f778f0f 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -72,7 +72,8 @@ cd build --enable-kernel=&min-kernel; \ --enable-stack-protector=strong \ --with-headers=/usr/include \ - libc_cv_slibdir=/usr/lib + libc_cv_slibdir=/usr/lib \ + libc_cv_rtlddir=/lib The meaning of the configure options: @@ -120,6 +121,14 @@ cd build + + libc_cv_rtlddir=/lib + + Fix hardcoded path to the executable loader in the + ldd script. + + + @@ -214,12 +223,12 @@ esac Install the package: make install - + Install the configuration file and runtime directory for nscd: From 1b1acbed6533097e85c80dd85681cac1842d4b79 Mon Sep 17 00:00:00 2001 From: "Thomas Trepl (Moody)" Date: Fri, 14 May 2021 12:54:44 +0200 Subject: [PATCH 2/3] Use /usr/lib for libc_cv_rtlddir --- chapter05/glibc.xml | 8 ++++---- chapter08/glibc.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 8a28e4546..e3d77b8bf 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -81,7 +81,7 @@ cd build --enable-kernel=&min-kernel; \ --with-headers=$LFS/usr/include \ libc_cv_slibdir=/usr/lib \ - libc_cv_rtlddir=/lib + libc_cv_rtlddir=/usr/lib The meaning of the configure options: @@ -123,7 +123,7 @@ cd build - libc_cv_rtlddir=/lib + libc_cv_rtlddir=/usr/lib Fix hardcoded path to the executable loader in the ldd script. @@ -193,12 +193,12 @@ cd build - + At this point, it is imperative to stop and ensure that the basic functions (compiling and linking) of the new toolchain are working as diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 16f778f0f..2b4c064e5 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -73,7 +73,7 @@ cd build --enable-stack-protector=strong \ --with-headers=/usr/include \ libc_cv_slibdir=/usr/lib \ - libc_cv_rtlddir=/lib + libc_cv_rtlddir=/usr/lib The meaning of the configure options: @@ -122,7 +122,7 @@ cd build - libc_cv_rtlddir=/lib + libc_cv_rtlddir=/usr/lib Fix hardcoded path to the executable loader in the ldd script. @@ -223,12 +223,12 @@ esac Install the package: make install - + Install the configuration file and runtime directory for nscd: From 7f25c8447d99d0ea9a88f822089300d06a500edb Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 14 May 2021 22:44:01 +0800 Subject: [PATCH 3/3] glibc: remove libc_cv_rtlddir override for now Back to use the sed. Need to investigate later. --- chapter05/glibc.xml | 3 +-- chapter08/glibc.xml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index e3d77b8bf..79c65913a 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -80,8 +80,7 @@ cd build --build=$(../scripts/config.guess) \ --enable-kernel=&min-kernel; \ --with-headers=$LFS/usr/include \ - libc_cv_slibdir=/usr/lib \ - libc_cv_rtlddir=/usr/lib + libc_cv_slibdir=/usr/lib The meaning of the configure options: diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 2b4c064e5..9aefe30d2 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -72,8 +72,7 @@ cd build --enable-kernel=&min-kernel; \ --enable-stack-protector=strong \ --with-headers=/usr/include \ - libc_cv_slibdir=/usr/lib \ - libc_cv_rtlddir=/usr/lib + libc_cv_slibdir=/usr/lib The meaning of the configure options: