Author: pierre
Date: Mon Apr 20 05:50:49 2020
New Revision: 11819

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

Modified:
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter06/adjusting.xml
   trunk/BOOK/general.ent

Modified: trunk/BOOK/chapter01/changelog.xml
==============================================================================
--- trunk/BOOK/chapter01/changelog.xml  Mon Apr 20 00:23:56 2020        (r11818)
+++ trunk/BOOK/chapter01/changelog.xml  Mon Apr 20 05:50:49 2020        (r11819)
@@ -43,6 +43,20 @@
     appropriate for the entry or if needed the entire day's listitem.
     -->
     <listitem>
+      <para>2020-04-20</para>
+      <itemizedlist>
+        <listitem>
+          <para>[pierre] - Change -isystem to -idirafter in "Adjusting the
+          toolchain". This allows to search g++ private headers before
+          the public ones, which is the normal search order, with the
+         drawback that it includes the headers in /tools if they exist
+         in both /usr and /tools. Fix most of
+          <ulink url="&lfs-ticket-root;4641">#4641</ulink>.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>2020-04-19</para>
       <itemizedlist>
         <listitem>

Modified: trunk/BOOK/chapter06/adjusting.xml
==============================================================================
--- trunk/BOOK/chapter06/adjusting.xml  Mon Apr 20 00:23:56 2020        (r11818)
+++ trunk/BOOK/chapter06/adjusting.xml  Mon Apr 20 05:50:49 2020        (r11819)
@@ -24,15 +24,17 @@
 mv -v /tools/bin/{ld-new,ld}
 ln -sv /tools/bin/ld /tools/$(uname 
-m)-pc-linux-gnu/bin/ld</userinput></screen>
 
-  <para>Next, amend the GCC specs file so that it points to the new
-  dynamic linker. Simply deleting all instances of <quote>/tools</quote> should
-  leave us with the correct path to the dynamic linker. Also adjust the specs 
file
-  so that GCC knows where to find the correct headers and Glibc start files.
+  <para>the next command amends the GCC specs file to achieve three goals:
+  first point GCC to the new dynamic linker. Simply deleting all instances of
+  <quote>/tools</quote> should leave us with the correct path to the dynamic
+  linker. Second, let GCC know where to find the Glibc start files. Third,
+  add the /usr/include directory at the end of the default search path, so
+  that header files added in chapter 6 are found.
   A <command>sed</command> command accomplishes this:</para>
 
 <screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g'                   \
     -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
-    -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' &gt;      \
+    -e '/\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt;      \
     `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>
 
   <para>It is a good idea to visually inspect the specs file to verify the
@@ -72,13 +74,18 @@
   <para os="g">Verify that the compiler is searching for the correct header
   files:</para>
 
-<screen><userinput>grep -B1 '^ /usr/include' dummy.log</userinput></screen>
+<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
 
   <para os="h">This command should return the following output:</para>
 
 <screen><computeroutput>#include &lt;...&gt; search starts here:
+ /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
+ /tools/include
+ /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
  /usr/include</computeroutput></screen>
 
+  <note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note>
+
   <para os="i">Next, verify that the new linker is being used with the correct 
search paths:</para>
 
 <screen os="j"><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; 
|\n|g'</userinput></screen>

Modified: trunk/BOOK/general.ent
==============================================================================
--- trunk/BOOK/general.ent      Mon Apr 20 00:23:56 2020        (r11818)
+++ trunk/BOOK/general.ent      Mon Apr 20 05:50:49 2020        (r11819)
@@ -1,13 +1,13 @@
-<!ENTITY version         "SVN-20200419">
+<!ENTITY version         "SVN-20200420">
 <!ENTITY short-version   "svn">  <!-- Used below in &blfs-book; 
                                       Change to x.y for release but not -rc 
releases -->
 <!ENTITY generic-version "development"> <!-- Use "development"  or 
"x.y[-pre{x}]" -->
 
-<!ENTITY versiond        "20200419-systemd">
+<!ENTITY versiond        "20200420-systemd">
 <!ENTITY short-versiond  "systemd">
 <!ENTITY generic-versiond "systemd"> 
 
-<!ENTITY releasedate     "April 19th, 2020">
+<!ENTITY releasedate     "April 20th, 2020">
 
 <!ENTITY copyrightdate   "1999-2020"><!-- jhalfs needs a literal dash, not 
&ndash; -->
 
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to