Changeset 2e02c35 for chapter05/gcc-pass2.xml
- Timestamp:
- 09/09/2005 08:34:44 PM (19 years ago)
- 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:
- 80d66d1
- Parents:
- 98fe721
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/gcc-pass2.xml
r98fe721 r2e02c35 59 59 working.</para> 60 60 61 <para>First correct a known problem and make an essential adjustment:</para> 62 63 <screen><userinput>patch -Np1 -i ../&gcc-no_fixincludes-patch; 64 patch -Np1 -i ../&gcc-specs-patch;</userinput></screen> 65 66 <para>The first patch disables the GCC <command>fixincludes</command> 67 script. This was briefly mentioned earlier, but a more in-depth 68 explanation of the fixincludes process is warranted here. Under normal 69 circumstances, the GCC <command>fixincludes</command> script scans the 70 system for header files that need to be fixed. It might find that some 71 Glibc header files on the host system need to be fixed, and will fix 72 them and put them in the GCC private include directory. In <xref 73 linkend="chapter-building-system"/>, after the newer Glibc has been 74 installed, this private include directory will be searched before the 75 system include directory. This may result in GCC finding the fixed 76 headers from the host system, which most likely will not match the 77 Glibc version used for the LFS system.</para> 78 79 <para>The second patch changes GCC's default location of the dynamic 80 linker (typically <filename class="libraryfile">ld-linux.so.2</filename>). It also removes 81 <filename class="directory">/usr/include</filename> from GCC's include 82 search path. Patching now rather than adjusting the specs file after 83 installation ensures that the new dynamic linker is used during the 84 actual build of GCC. That is, all of the final (and temporary) 85 binaries created during the build will link against the new 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> 75 76 <screen><userinput>cp gcc/Makefile.in{,.orig} && 77 sed 's@\(^NATIVE_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g' \ 78 gcc/Makefile.in.orig > gcc/Makefile.in</userinput></screen> 79 80 <para>The bootstrap build performed in <xref linkend="ch-tools-gcc-pass1"/> 81 built GCC with the <option>-fomit-frame-pointer</option> compiler flag. 82 Non-bootstrap builds omit this flag by default, so apply the following 83 <command>sed</command> to use it in order to ensure consistent compiler builds. 84 </para> 85 86 <screen><userinput>cp gcc/Makefile.in{,.tmp} && 87 sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \ 88 > gcc/Makefile.in</userinput></screen> 89 90 <para>Apply the following patch to change the location of GCC's default dynamic 91 linker (typically <filename class="libraryfile">ld-linux.so.2</filename>):</para> 92 93 <screen><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen> 94 95 <para>The above patch also removes 96 <filename class="directory">/usr/include</filename> from GCC's include search 97 path. Patching now rather than adjusting the specs file after installation 98 ensures that the new dynamic linker is used during the actual build of GCC. That 99 is, all of the binaries created during the build will link against the new 86 100 Glibc.</para> 87 101 88 <important><para>The above patch es arecritical in ensuring a102 <important><para>The above patch is critical in ensuring a 89 103 successful overall build. Do not forget to apply 90 them.</para></important>104 it.</para></important> 91 105 92 106 <para>Create a separate build directory again:</para> … … 181 195 url="&test-results;"/>.</para> 182 196 183 <para>A few unexpected failures cannot always be avoided. The 184 GCC developers are usually aware of these issues, but have not 185 resolved them yet. Unless the test results are vastly different from 186 those at the above URL, it is safe to continue.</para> 197 <para>A few unexpected failures cannot always be avoided. The GCC developers are 198 usually aware of these issues, but have not resolved them yet. In particular, 199 the <filename class="libraryfile">libmudflap</filename> tests are known be 200 particularly problematic as a result of a bug in GCC (<ulink 201 url="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20003"/>). Unless the test 202 results are vastly different from those at the above URL, it is safe to 203 continue.</para> 187 204 188 205 <para>Install the package:</para>
Note:
See TracChangeset
for help on using the changeset viewer.