[lfs] branch trunk updated: gcc: disable fixincludes for pass 1 and pass 2 too
"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]> Sun, 14 Jun 2026 08:30:09 +0000
| Newsgroups | gmane.linux.lfs.book |
|---|---|
| Message-ID | <178142580969.429.5920265202457985190@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository lfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 3520acb41 gcc: disable fixincludes for pass 1 and pass 2 too
3520acb41 is described below
commit 3520acb4152d5ef8f6df24e2f346a365019d7b09
Author: Xi Ruoyao <[email protected]>
AuthorDate: Sun Jun 14 06:02:28 2026 +0800
gcc: disable fixincludes for pass 1 and pass 2 too
Doing so is not strictly needed but it improves the consistency and
saves some CPU cycles building LFS. It may also potentially avoid a
build failure in case GCC pass 2 fixincludes breaks a pattern in a
header from some release of glibc or kernel.
---
chapter05/gcc-pass1.xml | 13 +++++++++++++
chapter06/gcc-pass2.xml | 12 ++++++++++++
chapter08/gcc.xml | 11 -----------
3 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index c73815686..2eab9aad1 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -106,6 +106,7 @@ cd build</userinput></screen>
--without-headers \
--enable-default-pie \
--enable-default-ssp \
+ --disable-fixincludes \
--disable-nls \
--disable-shared \
--disable-multilib \
@@ -164,6 +165,18 @@ cd build</userinput></screen>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>--disable-fixincludes</parameter></term>
+ <listitem>
+ <para>By default, during the installation of GCC some system
+ headers would be <quote>fixed</quote> to be used with GCC. At
+ this point we've installed no headers for the cross-compiler to
+ use, so building the auxilary programs for the <quote>fix</quote>
+ would just waste time. This switch disables the
+ <quote>fix</quote> and skips the build of those programs.</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><parameter>--disable-shared</parameter></term>
<listitem>
diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml
index 98dd9c875..9f7d49d82 100644
--- a/chapter06/gcc-pass2.xml
+++ b/chapter06/gcc-pass2.xml
@@ -81,6 +81,7 @@ cd build</userinput></screen>
--with-build-sysroot=$LFS \
--enable-default-pie \
--enable-default-ssp \
+ --disable-fixincludes \
--disable-nls \
--disable-multilib \
--disable-libatomic \
@@ -125,6 +126,17 @@ cd build</userinput></screen>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>--disable-fixincludes</parameter></term>
+ <listitem>
+ <para>By default, during the installation of GCC some system
+ headers would be <quote>fixed</quote> to be used with GCC. This
+ is not necessary for a modern Linux system, and potentially
+ harmful if a package is reinstalled after installing GCC. This
+ switch prevents GCC from <quote>fixing</quote> the headers.</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><parameter>--disable-libsanitizer</parameter></term>
<listitem>
diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml
index 854ddf202..529ca13b3 100644
--- a/chapter08/gcc.xml
+++ b/chapter08/gcc.xml
@@ -120,17 +120,6 @@ cd build</userinput></screen>
</listitem>
</varlistentry>
- <varlistentry>
- <term><parameter>--disable-fixincludes</parameter></term>
- <listitem>
- <para>By default, during the installation of GCC some system
- headers would be <quote>fixed</quote> to be used with GCC. This
- is not necessary for a modern Linux system, and potentially
- harmful if a package is reinstalled after installing GCC. This
- switch prevents GCC from <quote>fixing</quote> the headers.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term><parameter>--with-system-zlib</parameter></term>
<listitem>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page