Ignore:
Timestamp:
09/30/2022 09:10:06 AM (19 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
d11d449
Parents:
77b46db
git-author:
Xi Ruoyao <xry111@…> (09/30/2022 09:03:08 AM)
git-committer:
Xi Ruoyao <xry111@…> (09/30/2022 09:10:06 AM)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • part3intro/toolchaintechnotes.xml

    r77b46db r543c94c  
    257257    gcc does not know that it is usable on pc, and (2) using it on pc
    258258    would create a risk of linking to the pc libraries, since cc-lfs is a native
    259     compiler. So we have to re-build libstdc++ twice later on: as a part of
    260     gcc stage 2, and then again in the chroot environment (gcc stage 3).</para>
     259    compiler. So we have to re-build libstdc++ later as a part of
     260    gcc stage 2.</para>
     261
     262    <para>In &ch-final; (or <quote>stage 3</quote>), all packages needed for
     263    the LFS system are built. Even if a package is already installed into
     264    the LFS system in a previous chapter, we still rebuild the package
     265    unless we are completely sure it's unnecessary.  The main reason for
     266    rebuilding these packages is to settle them down: if we reinstall a LFS
     267    package on a complete LFS system, the installed content of the package
     268    should be same as the content of the same package installed in
     269    &ch-final;.  The temporary packages installed in &ch-tmp-cross; or
     270    &ch-tmp-chroot; cannot satisify this expectation because some of them
     271    are built without optional dependencies installed, and autoconf cannot
     272    perform some feature checks in &ch-tmp-cross; because of cross
     273    compilation, causing the temporary packages to lack optional features
     274    or use suboptimal code routines. Additionally, a minor reason for
     275    rebuilding the packages is allowing to run the testsuite.</para>
    261276
    262277  </sect2>
Note: See TracChangeset for help on using the changeset viewer.