Changeset 27ced84 for chapter05


Ignore:
Timestamp:
10/04/2005 07:56:35 PM (19 years ago)
Author:
Matthew Burgess <matthew@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
795f15c
Parents:
cad7b50
Message:

Prevent GCC's fixincludes from running during chapter 5 pass2 and chapter 6

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@6959 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter05
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter05/adjusting.xml

    rcad7b50 r27ced84  
    6262necessary.</para></important>
    6363
    64 <para>There is a possibility that some header files from the host system have
    65 found their way into GCC's private include dir. This can happen as a result of
    66 GCC's <quote>fixincludes</quote> process, which runs as part of the GCC build.
    67 This is explained in more detail later in this chapter. Run the following commands to remove those header files (you may find it easier to copy and paste these commands, rather than typing them by hand, due to their length):</para>
     64<para>During the build process, GCC runs a script
     65(<command>fixincludes</command>) that scans the system for header files that may
     66need to be fixed (they might contain syntax errors, for example), and installs
     67the fixed versions in a private include directory.  There is a possibility that,
     68as a result of this process, some header files from the host system have found
     69their way into GCC's private include dir. As the rest of this chapter only
     70requires the headers from GCC and Glibc, which have both been installed at this
     71point, any &quot;fixed&quot; headers can safely be removed.  This helps to avoid
     72any host headers polluting the build environment.  Run the following commands to
     73remove the header files in GCC's private include directory (you may find it
     74easier to copy and paste these commands, rather than typing them by hand, due to
     75their length):</para>
    6876
    6977<!-- && used to ease copy and pasting -->
  • chapter05/gcc-pass2.xml

    rcad7b50 r27ced84  
    5959working.</para>
    6060
    61 <para>Under normal circumstances, the GCC <command>fixincludes</command> script
    62 scans the system for header files that need to be fixed (they may contain syntax
    63 errors, for example).  The script might find that some Glibc header files on the
    64 host system need to be fixed, so fixes them and puts them in the GCC private
    65 include directory. In <xref linkend="chapter-building-system"/>, after the
    66 newer Glibc has been installed, this private include directory will be searched
    67 before the system include directory.  This may result in GCC finding the fixed
    68 headers from the host system, which most likely will not match the Glibc version
    69 used for the LFS system.</para>
    70 
    71 <para>The following command adjusts where the GCC <command>fixincludes</command>
    72 script searches for headers, so that it fixes only the new headers under
    73 <filename class="directory">/tools</filename>, not the ones from your host
    74 system.</para>
     61<para>As previously explained in <xref linkend="ch-tools-adjusting"/>,  under
     62normal circumstances the GCC <command>fixincludes</command> script is run in
     63order to fix potentially broken header files.  As GCC-&gcc-version; and
     64Glibc-&glibc-version; have already been installed at this point, and their
     65respective header files are known not to require fixing, the
     66<command>fixincludes</command> script is not required.  As mentioned previously,
     67the script may in fact pollute the build environment by installing fixed headers
     68from the host system into GCC's private include directory.  The running of the
     69<command>fixincludes</command> script can be suppressed by issuing the following
     70commands:</para>
    7571
    7672<screen><userinput>cp -v gcc/Makefile.in{,.orig} &amp;&amp;
    77 sed 's@\(^NATIVE_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g' \
    78       gcc/Makefile.in.orig &gt; gcc/Makefile.in</userinput></screen>
     73sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig &gt; gcc/Makefile.in</userinput></screen>
    7974
    8075<para>The bootstrap build performed in <xref linkend="ch-tools-gcc-pass1"/>
Note: See TracChangeset for help on using the changeset viewer.