r7583 - in trunk/BOOK: chapter01 chapter06

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Tue May 2 19:37:52 PDT 2006


Author: jhuntwork
Date: 2006-05-02 20:37:49 -0600 (Tue, 02 May 2006)
New Revision: 7583

Modified:
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter06/gcc.xml
   trunk/BOOK/chapter06/readjusting.xml
Log:
Fixed sanity checks to work after final GCC and changed their format.
Resolves ticket #1768.


Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml	2006-05-03 01:05:04 UTC (rev 7582)
+++ trunk/BOOK/chapter01/changelog.xml	2006-05-03 02:37:49 UTC (rev 7583)
@@ -40,6 +40,10 @@
       <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
           it is already covered in BLFS.</para>
         </listitem>

Modified: trunk/BOOK/chapter06/gcc.xml
===================================================================
--- trunk/BOOK/chapter06/gcc.xml	2006-05-03 01:05:04 UTC (rev 7582)
+++ trunk/BOOK/chapter06/gcc.xml	2006-05-03 02:37:49 UTC (rev 7583)
@@ -112,15 +112,99 @@
 
 <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>
 
   <sect2 id="contents-gcc" role="content">

Modified: trunk/BOOK/chapter06/readjusting.xml
===================================================================
--- trunk/BOOK/chapter06/readjusting.xml	2006-05-03 01:05:04 UTC (rev 7582)
+++ trunk/BOOK/chapter06/readjusting.xml	2006-05-03 02:37:49 UTC (rev 7583)
@@ -52,65 +52,72 @@
     linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para>
   </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(){}' > dummy.c
+<screen role="nodump" os="a"><userinput>echo 'main(){}' > dummy.c
 cc dummy.c -Wl,--verbose &> 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>




More information about the lfs-book mailing list