diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 932f94ee3..b5ab29713 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -43,6 +43,16 @@
appropriate for the entry or if needed the entire day's listitem.
-->
+
+ 2019-03-25
+
+
+ [xry111] - Use -ffile-prefix-map instead of -isystem and
+ symlinks in the Glibc build to simplify the instruction.
+
+
+
+
2019-03-13
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index 52f03219c..04a7d6f5f 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -60,31 +60,29 @@
Fix a minor security issue with glob functions:
patch -Np1 -i ../&glibc-glob-patch;
--->
+-->
+ Create a symlink for LSB
compliance. Additionally, for x86_64, create a compatibility symlink
required for the dynamic loader to function correctly:
case $(uname -m) in
- i?86) GCC_INCDIR=/usr/lib/gcc/$(uname -m)-pc-linux-gnu/&gcc-version;/include
- ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3
+ i?86) ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3
;;
- x86_64) GCC_INCDIR=/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
- ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
+ x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
ln -sfv ../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:
@@ -93,22 +91,22 @@ cd build
Prepare Glibc for compilation:
-CC="gcc -isystem $GCC_INCDIR -isystem /usr/include" \
+CC="gcc -ffile-prefix-map=/tools=/usr" \
../configure --prefix=/usr \
--disable-werror \
--enable-kernel=&min-kernel; \
--enable-stack-protector=strong \
- libc_cv_slibdir=/lib
-unset GCC_INCDIR
+ libc_cv_slibdir=/lib
The meaning of the options and new configure parameters:
- CC="gcc -isystem $GCC_INCDIR -isystem /usr/include"
+ CC="gcc -ffile-prefix-map=/tools=/usr"
- Setting the location of both gcc and system include directories
- avoids introduction of invalid paths in debugging symbols.
+ Make GCC record any references to files in /tools in result
+ of the compilation as if the files resided in /usr. This avoids
+ introduction of invalid paths in debugging symbols.