Parcourir la source

Fixed sanity checks to work after final GCC and changed their format.
Resolves ticket #1768.


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

Jeremy Huntwork il y a 19 ans
Parent
commit
09f1daf453
3 fichiers modifiés avec 141 ajouts et 46 suppressions
  1. 4 0
      chapter01/changelog.xml
  2. 92 8
      chapter06/gcc.xml
  3. 45 38
      chapter06/readjusting.xml

+ 4 - 0
chapter01/changelog.xml

@@ -39,6 +39,10 @@
     <listitem>
       <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>

+ 92 - 8
chapter06/gcc.xml

@@ -112,14 +112,98 @@ cd ../gcc-build</userinput></screen>
 
 <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>
 

+ 45 - 38
chapter06/readjusting.xml

@@ -52,65 +52,72 @@ perl -p -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;' \
     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(){}' &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>SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
+SEARCH_DIR("/usr/lib")
+SEARCH_DIR("/lib");</computeroutput></screen>
+
+  <para os="j">Next make sure that we're using the correct libc:</para>
+
+<screen role="nodump" os="k"><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen>
+
+  <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>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
+<screen os="m"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
 
-    <para>Lastly, make sure GCC is using the correct dynamic linker:</para>
+  <para os="n">Lastly, make sure GCC is using the correct dynamic linker:</para>
 
-<screen><userinput>grep found dummy.log</userinput></screen>
+<screen role="nodump" os="o"><userinput>grep found 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="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><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen>
+<screen os="q"><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</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="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>Once everything is working correctly, clean up the test
-    files:</para>
+  <para os="s">Once everything is working correctly, clean up the test files:</para>
 
-<screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
-  </caution>
+<screen role="nodump" os="t"><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
 
 </sect1>