From be3d9f313a25000d1cbaa631852be62330828f2c Mon Sep 17 00:00:00 2001 From: DJ Lucas Date: Sat, 17 Dec 2016 06:46:18 +0000 Subject: [PATCH] Merge nosym branch. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11154 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 11 +++++++++++ chapter05/gcc-pass1.xml | 16 +++++++++++++--- chapter05/gcc-pass2.xml | 13 +++++++++++-- chapter06/creatingdirs.xml | 4 +--- chapter06/gcc.xml | 16 ++++++++++++---- chapter06/glibc.xml | 15 ++++++++++++++- chapter06/libcap.xml | 12 +++++++++++- general.ent | 6 +++--- 8 files changed, 76 insertions(+), 17 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 2677d5842..413830867 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,17 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2016-12-17 + + + [dj] - Remove {,/usr}/lib64 symlinks for x86_64 builds. Add + /lib64 directory with symlinks to dynamic loader. Adjust installation + of glibc, gcc, and libcap to account for filesystemd changes. + + + + 2016-12-10 diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 694bfe780..f72e11df0 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -68,8 +68,7 @@ mv -v mpc-&mpc-version; mpc class="directory">/usr/include from GCC's include search path. Issue: -for file in \ - $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) +for file in gcc/config/{linux,i386/linux{,64}}.h do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ @@ -97,7 +96,18 @@ done Finally, we use touch to update the timestamp on the copied files. When used in conjunction with cp -u, this prevents unexpected changes to the original files in case the commands are - inadvertently run twice. + inadvertently run twice. + + Finally, on x86_64 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 + + If building on x86_64, change the default direcotory 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 + The GCC documentation recommends building GCC in a dedicated build directory: mkdir -v build @@ -175,10 +185,8 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ Depending on your machine architecture, the above may differ slightly, the difference usually being the name of the directory - after /usr/lib/gcc. If your machine is - a 64-bit system, you may also see a directory named lib64 - towards the end of the string. The important thing to - look for here is that gcc has found all three + after /usr/lib/gcc. The important + thing to look for here is that gcc has found all three crt*.o files under the /usr/lib directory. diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 1a908a822..2c8718932 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -57,6 +57,18 @@ patch -Np1 -i ../&glibc-fhs-patch; + Create a symlink for LSB compliance and, for x86_64, a + compatibility symlink required for the dynamic loader to function + correctly: + +case $(uname -m) in + x86) ln -s ld-linux.so.2 /lib/ld-lsb.so.3 + ;; + x86_64) ln -s ../lib/ld-linux-x86-64.so.2 /lib64 + ln -s ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 + ;; +esac + The Glibc documentation recommends building Glibc in a dedicated build directory: @@ -67,7 +79,8 @@ cd build ../configure --prefix=/usr \ --enable-kernel=&min-kernel; \ - --enable-obsolete-rpc + --enable-obsolete-rpc \ + libc_cv_slibdir=/lib Compile the package: diff --git a/chapter06/libcap.xml b/chapter06/libcap.xml index 76d855263..cabcb1774 100644 --- a/chapter06/libcap.xml +++ b/chapter06/libcap.xml @@ -55,7 +55,7 @@ Install the package: -make RAISE_SETFCAP=no prefix=/usr install +make RAISE_SETFCAP=no lib=lib prefix=/usr install chmod -v 755 /usr/lib/libcap.so @@ -70,6 +70,16 @@ chmod -v 755 /usr/lib/libcap.so + + lib=lib + + This parameter installs the library in + $prefix/lib rather than + $prefix/lib64 on x86_64. It has no effect on + x86. + + + The shared library needs to be moved to diff --git a/general.ent b/general.ent index 7e86984b4..47269cc70 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - +