From 07312f6eec9cd6e0f5581bbf5720c8416cea70f2 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 17 May 2009 03:20:56 +0000 Subject: [PATCH] Correct bootstrap explanation in gcc sections. Thanks to Chris Staub. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8883 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 6 ++++++ chapter05/gcc-pass2.xml | 20 +++++++++++++------- chapter06/gcc.xml | 10 ++++------ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 01962f6d1..6aad91eee 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,12 @@ 2009-05-16 + + [bdubbs] - Update gcc instruction explanations. + Thanks to Chris Staub for the patch. + Fixes + #2363. + [bdubbs] - Add an explanation about using the barrier option in fstab. diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index 75bca7092..b60c5c00a 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -66,10 +66,11 @@ cp -v gcc/Makefile.in{,.orig} sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in - Non-bootstrap builds omit the - build flag by default, and the goal should be to produce a compiler that is - exactly the same as if it were bootstrapped. Apply the following - sed command to force the build to use the flag: + For x86 machines, a bootstrap build of GCC uses the + compiler flag. Non-bootstrap builds + omit this flag by default, and the goal should be to produce a compiler + that is exactly the same as if it were bootstrapped. Apply the following + sed command to force the build to use the flag: cp -v gcc/Makefile.in{,.tmp} sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \ @@ -209,9 +210,14 @@ cd ../gcc-build --disable-bootstrap - Bootstrapping the compiler is now the default for GCC. However, - our build method should provide us with a solid compiler without the - need to bootstrap each time. + For native builds of GCC, the default is to a "bootstrap" build. + This does not just compile GCC, but compiles it several times. It + uses the programs compiled in a first round to compile itself a + second time, and then again a third time. The second and third + iterations are compared to make sure it can reproduce itself + flawlessly. This also implies that it was compiled correctly. + However, the LFS build method should provide a solid compiler + without the need to bootstrap each time. diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index dc4e01ede..101a43d63 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -48,12 +48,10 @@ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - For x86 machines, the bootstrap build performed in - - built GCC with the compiler flag. - Non-bootstrap builds omit this flag by default, so apply the following - sed to use it in order to ensure consistent compiler - builds: + As in , apply the following + sed to force the build to use the + compiler flag in order to ensure + consistent compiler builds: case `uname -m` in i?86) sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' \