Ignore:
Timestamp:
04/20/2020 12:50:49 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
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, 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:
7fd302c
Parents:
0b403eb3
Message:

Change -isystem to -idirafter in "adjusting". Fix most of #4641.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/adjusting.xml

    r0b403eb3 rafc6823  
    2525ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput></screen>
    2626
    27   <para>Next, amend the GCC specs file so that it points to the new
    28   dynamic linker. Simply deleting all instances of <quote>/tools</quote> should
    29   leave us with the correct path to the dynamic linker. Also adjust the specs file
    30   so that GCC knows where to find the correct headers and Glibc start files.
     27  <para>the next command amends the GCC specs file to achieve three goals:
     28  first point GCC to the new dynamic linker. Simply deleting all instances of
     29  <quote>/tools</quote> should leave us with the correct path to the dynamic
     30  linker. Second, let GCC know where to find the Glibc start files. Third,
     31  add the /usr/include directory at the end of the default search path, so
     32  that header files added in chapter 6 are found.
    3133  A <command>sed</command> command accomplishes this:</para>
    3234
    3335<screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g'                   \
    3436    -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
    35     -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' &gt;      \
     37    -e '/\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt;      \
    3638    `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>
    3739
     
    7375  files:</para>
    7476
    75 <screen><userinput>grep -B1 '^ /usr/include' dummy.log</userinput></screen>
     77<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
    7678
    7779  <para os="h">This command should return the following output:</para>
    7880
    7981<screen><computeroutput>#include &lt;...&gt; search starts here:
     82 /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
     83 /tools/include
     84 /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
    8085 /usr/include</computeroutput></screen>
     86
     87  <note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note>
    8188
    8289  <para os="i">Next, verify that the new linker is being used with the correct search paths:</para>
Note: See TracChangeset for help on using the changeset viewer.