Index: chapter01/changelog.xml
===================================================================
--- chapter01/changelog.xml	(revision fffff976f53bf9b861809ef6a8c61c5a4d6bf580)
+++ chapter01/changelog.xml	(revision 09f1daf45389f406a5225fa829e896d87e3a140b)
@@ -40,4 +40,8 @@
       <para>May 2, 2006</para>
       <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Fixed sanity checks to work after final GCC
+          and changed their format. Resolves ticket #1768.</para>
+        </listitem>
         <listitem>
           <para>[archaic] - Removed mention of usbfs from the fstab page since
Index: chapter06/gcc.xml
===================================================================
--- chapter06/gcc.xml	(revision fffff976f53bf9b861809ef6a8c61c5a4d6bf580)
+++ chapter06/gcc.xml	(revision 09f1daf45389f406a5225fa829e896d87e3a140b)
@@ -113,12 +113,96 @@
 <screen><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
 
-    <note>
-      <para>At this point, it is strongly recommended to repeat the sanity
-      check performed earlier in this chapter. Refer back to <xref
-      linkend="ch-system-readjusting" role=","/> and repeat the check. If
-      the results are in error, then the most likely reason is that the GCC
-      Specs patch from <xref linkend="chapter-temporary-tools"/> was
-      erroneously applied here.</para>
-    </note>
+    <para>Now that our final toolchain is in place, it is important to again ensure
+    that compiling and linking will work as expected. We do this by performing
+    the same sanity checks as we did earlier in the chapter:</para>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='a'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='b'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='c'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='d'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='e'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='f'])"/>
+
+<screen><computeroutput>/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crt1.o succeeded
+/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crti.o succeeded
+/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crtn.o succeeded</computeroutput></screen>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='g'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='h'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='i'])"/>
+
+<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
+SEARCH_DIR("/usr/local/lib")
+SEARCH_DIR("/lib")
+SEARCH_DIR("/usr/lib");</computeroutput></screen>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='j'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='k'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='l'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='m'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='n'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='o'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='p'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='q'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='r'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='s'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='t'])"/>
 
   </sect2>
Index: chapter06/readjusting.xml
===================================================================
--- chapter06/readjusting.xml	(revision fffff976f53bf9b861809ef6a8c61c5a4d6bf580)
+++ chapter06/readjusting.xml	(revision 09f1daf45389f406a5225fa829e896d87e3a140b)
@@ -53,64 +53,71 @@
   </important>
 
-  <caution>
-    <para>It is imperative at this point to stop and ensure that the basic
-    functions (compiling and linking) of the adjusted toolchain are working
-    as expected. To do this, perform a sanity check:</para>
+  <para>It is imperative at this point to ensure that the basic
+  functions (compiling and linking) of the adjusted toolchain are working
+  as expected. To do this, perform the following sanity checks:</para>
 
-<screen><userinput>echo 'main(){}' &gt; dummy.c
+<screen role="nodump" os="a"><userinput>echo 'main(){}' &gt; dummy.c
 cc dummy.c -Wl,--verbose &amp;&gt; dummy.log
 readelf -l a.out | grep ': /lib'</userinput></screen>
 
-    <para>If everything is working correctly, there should be no errors,
-    and the output of the last command will be (allowing for
-    platform-specific differences in dynamic linker name):</para>
+  <para os="b">If everything is working correctly, there should be no errors,
+  and the output of the last command will be (allowing for
+  platform-specific differences in dynamic linker name):</para>
 
-<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
+<screen os="c"><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
 
-    <para>Note that <filename class="directory">/lib</filename> is now
-    the prefix of our dynamic linker.</para>
+  <para>Note that <filename class="directory">/lib</filename> is now
+  the prefix of our dynamic linker.</para>
 
-    <para>Now make sure that we're setup to use the correct start files:</para>
+  <para os="d">Now make sure that we're setup to use the correct startfiles:</para>
 
-<screen><userinput>grep "/usr/lib/crt.* " dummy.log</userinput></screen>
+<screen role="nodump" os="e"><userinput>grep -o '/usr/lib.*/crt[1in].* .*' dummy.log</userinput></screen>
 
-    <para>If everything is working correctly, there should be no errors,
+  <para os="f">If everything is working correctly, there should be no errors,
     and the output of the last command will be:</para>
 
-<screen><computeroutput>attempt to open /usr/lib/crt1.o succeeded
-attempt to open /usr/lib/crti.o succeeded
-attempt to open /usr/lib/crtn.o succeeded</computeroutput></screen>
+<screen><computeroutput>/usr/lib/crt1.o succeeded
+/usr/lib/crti.o succeeded
+/usr/lib/crtn.o succeeded</computeroutput></screen>
 
-    <para>Next make sure that we're using the correct libc:</para>
+  <para os="g">Next, verify that the new linker is being used with the correct search paths:</para>
 
-<screen><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen>
+<screen role="nodump" os="h"><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen>
 
-    <para>If everything is working correctly, there should be no errors,
-    and the output of the last command will be:</para>
+  <para os="i">If everything is working correctly, there should be no errors,
+  and the output of the last command will be:</para>
 
-<screen><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
+<screen><computeroutput>SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
+SEARCH_DIR("/usr/lib")
+SEARCH_DIR("/lib");</computeroutput></screen>
 
-    <para>Lastly, make sure GCC is using the correct dynamic linker:</para>
+  <para os="j">Next make sure that we're using the correct libc:</para>
 
-<screen><userinput>grep found dummy.log</userinput></screen>
+<screen role="nodump" os="k"><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen>
 
-    <para>If everything is working correctly, there should be no errors,
-    and the output of the last command will be (allowing for
-    platform-specific differences in dynamic linker name):</para>
+  <para os="l">If everything is working correctly, there should be no errors,
+  and the output of the last command will be:</para>
 
-<screen><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen>
+<screen os="m"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
 
-    <para>If the output does not appear as shown above or is not received
-    at all, then something is seriously wrong. Investigate and retrace the
-    steps to find out where the problem is and correct it. The most likely
-    reason is that something went wrong with the specs file amendment
-    above. Any issues will need to be resolved before continuing on with
-    the process.</para>
+  <para os="n">Lastly, make sure GCC is using the correct dynamic linker:</para>
 
-    <para>Once everything is working correctly, clean up the test
-    files:</para>
+<screen role="nodump" os="o"><userinput>grep found dummy.log</userinput></screen>
 
-<screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
-  </caution>
+  <para os="p">If everything is working correctly, there should be no errors,
+  and the output of the last command will be (allowing for
+  platform-specific differences in dynamic linker name):</para>
+
+<screen os="q"><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen>
+
+  <para os="r">If the output does not appear as shown above or is not received
+  at all, then something is seriously wrong. Investigate and retrace the
+  steps to find out where the problem is and correct it. The most likely
+  reason is that something went wrong with the specs file adjustment. Any
+  issues will need to be resolved before continuing on with the process.</para>
+
+  <para os="s">Once everything is working correctly, clean up the test files:</para>
+
+<screen role="nodump" os="t"><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
 
 </sect1>
