diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-09-30 17:03:08 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-09-30 17:10:06 +0800 |
commit | 543c94cb9cf7e27e4817960a94e1429130799f27 (patch) | |
tree | ddf59149828b43fd77fa8c6de91ca8832a1837ab /part3intro/toolchaintechnotes.xml | |
parent | 77b46db0a84285c86a4963c6fea9f3ec1b45d8f4 (diff) |
libstdc++ "stage 3" is not rebuilt for the same reason as "stage 2"
I'm pretty sure "stage 2" libstdc++ (installed in ch6) is already fully
featured. The reason to rebuild the stage 3 libstdc++ (or entire
stage 3 gcc) is same as the reason to rebuild every packages in multiple
chapters: to "settle down" it.
Merge the content of
https://www.linuxfromscratch.org/lfs/faq.html#rebuild-ch8 into the book
as an explanation.
Diffstat (limited to 'part3intro/toolchaintechnotes.xml')
-rw-r--r-- | part3intro/toolchaintechnotes.xml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/part3intro/toolchaintechnotes.xml b/part3intro/toolchaintechnotes.xml index a6206bb91..16b6aafd2 100644 --- a/part3intro/toolchaintechnotes.xml +++ b/part3intro/toolchaintechnotes.xml @@ -256,8 +256,23 @@ would be able to build those libraries, but (1) the build system of gcc does not know that it is usable on pc, and (2) using it on pc would create a risk of linking to the pc libraries, since cc-lfs is a native - compiler. So we have to re-build libstdc++ twice later on: as a part of - gcc stage 2, and then again in the chroot environment (gcc stage 3).</para> + compiler. So we have to re-build libstdc++ later as a part of + gcc stage 2.</para> + + <para>In &ch-final; (or <quote>stage 3</quote>), all packages needed for + the LFS system are built. Even if a package is already installed into + the LFS system in a previous chapter, we still rebuild the package + unless we are completely sure it's unnecessary. The main reason for + rebuilding these packages is to settle them down: if we reinstall a LFS + package on a complete LFS system, the installed content of the package + should be same as the content of the same package installed in + &ch-final;. The temporary packages installed in &ch-tmp-cross; or + &ch-tmp-chroot; cannot satisify this expectation because some of them + are built without optional dependencies installed, and autoconf cannot + perform some feature checks in &ch-tmp-cross; because of cross + compilation, causing the temporary packages to lack optional features + or use suboptimal code routines. Additionally, a minor reason for + rebuilding the packages is allowing to run the testsuite.</para> </sect2> |