aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05')
-rw-r--r--chapter05/gcc-pass1-inst.xml3
-rw-r--r--chapter05/gcc-pass2-inst.xml5
-rw-r--r--chapter05/lockingglibc.xml12
3 files changed, 14 insertions, 6 deletions
diff --git a/chapter05/gcc-pass1-inst.xml b/chapter05/gcc-pass1-inst.xml
index d7f98aa0a..737cfba96 100644
--- a/chapter05/gcc-pass1-inst.xml
+++ b/chapter05/gcc-pass1-inst.xml
@@ -12,9 +12,6 @@ Therefore, if you have defined any environment variables that override
default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
or modifying them when building GCC.</para>
-<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch
-patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch</userinput></screen></para>
-
<para>It is recommended by the GCC installation documentation to build
GCC outside of the source directory in a dedicated directory:</para>
diff --git a/chapter05/gcc-pass2-inst.xml b/chapter05/gcc-pass2-inst.xml
index ce88c062a..3a090fb06 100644
--- a/chapter05/gcc-pass2-inst.xml
+++ b/chapter05/gcc-pass2-inst.xml
@@ -7,10 +7,9 @@
They will all unfold into a single <filename>gcc-&gcc-version;/</filename>
subdir.</para>
-<para>First correct two problems and make an essential adjustment:</para>
+<para>First correct one problem and make an essential adjustment:</para>
-<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch
-patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch
+<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes.patch
patch -Np1 -i ../gcc-&gcc-specs-version;.patch</userinput></screen></para>
<para>The last patch changes GCC's default location of the dynamic linker,
diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml
index 3c21e8c97..18cc6d826 100644
--- a/chapter05/lockingglibc.xml
+++ b/chapter05/lockingglibc.xml
@@ -35,6 +35,18 @@ unset SPECFILE</userinput></screen></para>
it all in. Or you can edit the specs file by hand if you want to: just replace
"/lib/ld-linux.so.2" with "/stage1/lib/ld-linux.so.2".</para>
+<para>Also, because we allowed GCC's "Fixincludes" script to modify our host's
+header files (and this was necessary because of improper use of the __thread
+keyword in some older software), we want to get rid of those modified header
+files, and replace them with pristine ones.</para>
+
+<para><screen><userinput>GCCDIR=/stage1/lib/gcc-lib/*/*
+rm -rf $GCCDIR/include/*
+cp $GCCDIR/install-tools/include/* $GCCDIR/include
+cp $GCCDIR/install-tools/gsyslimits.h \
+ $GCCDIR/include/syslimits.h
+unset GCCDIR</userinput></screen></para>
+
<para>This completes the installation of the self-contained toolchain, which
can now be used to build the rest of the temporary tools.</para>