Author: robert
Date: 2006-11-27 09:47:58 -0700 (Mon, 27 Nov 2006)
New Revision: 907

Modified:
   branches/2.4-branch/BOOK/chapter01/changelog.xml
   branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml
Log:
Use g++ in gcc-pass2 to run the sanity test

Modified: branches/2.4-branch/BOOK/chapter01/changelog.xml
===================================================================
--- branches/2.4-branch/BOOK/chapter01/changelog.xml    2006-11-27 15:00:26 UTC 
(rev 906)
+++ branches/2.4-branch/BOOK/chapter01/changelog.xml    2006-11-27 16:47:58 UTC 
(rev 907)
@@ -109,6 +109,9 @@
 </listitem>
 -->
 
+<listitem><para>November 27th, 2005 [Robert]: Use g++ in gcc-pass2 to run the 
sanity
+test.</para></listitem>
+
 <listitem><para>November 27th, 2005 [Robert]: Removed the gcc specs patch, and 
use
 sed command instead, to resolve a bug in Binutils test suite.</para></listitem>
 

Modified: branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml
===================================================================
--- branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml    2006-11-27 15:00:26 UTC 
(rev 906)
+++ branches/2.4-branch/BOOK/chapter05/gcc-pass2.xml    2006-11-27 16:47:58 UTC 
(rev 907)
@@ -155,10 +155,51 @@
 
 <screen><userinput>make install</userinput></screen>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-    href="adjusting.xml"
-    xpointer="xpointer(/sect1/caution[1])"/>
+  <caution>
+    <para>At this point, it is imperative to stop and ensure that the basic
+    functions (compiling and linking) of the new toolchain are working as
+    expected. To perform a sanity check, run the following commands:</para>
 
+<screen><userinput>echo 'int main(){return 0;}' &gt; dummy.c
+g++ dummy.c
+readelf -l a.out | grep ': /tools'</userinput></screen>
+
+    <para>If everything is working correctly, there should be no errors,
+    and the output of the last command will be of the form:</para>
+
+<screen condition="uclibc"><computeroutput>[Requesting program interpreter:
+    /tools/lib/ld-uClibc.so.0]</computeroutput></screen>
+
+<screen condition="glibc">><computeroutput>[Requesting program interpreter:
+    /tools/lib/ld-linux.so.2]</computeroutput></screen>
+
+    <para>Note that <filename class="directory">/tools/lib</filename>
+    appears as the prefix of the dynamic linker.</para>
+
+    <para>If the output is not shown as above or there was no output at all,
+    then something is wrong. Investigate and retrace the steps to find out
+    where the problem is and correct it. This issue must be resolved before
+    continuing on. First, perform the sanity check again, using
+    <command>gcc</command> instead of <command>g++</command>. If this works,
+    then the g++ package was not installed, and you should begin
+    <xref linkend="ch-tools-gcc-pass2" role=","/> again after removing and
+    re-unpacking the gcc and g++ sources. Next, ensure that the
+    <envar>PATH</envar> is correct. This can be checked by running
+    <command>echo $PATH</command> and verifying that
+    <filename class="directory">/tools/bin</filename> is at the head of the
+    list. If the <envar>PATH</envar> is wrong it could mean that you are not
+    logged in as user <systemitem class="username">hlfs</systemitem> or that
+    something went wrong back in <xref linkend="prepare-settingenviron"
+    role="."/> Another option is that something may have gone wrong with the
+    specs file amendment above. In this case, redo the specs file amendment,
+    being careful to copy-and-paste the commands.</para>
+
+    <para>Once all is well, clean up the test files:</para>
+
+<screen><userinput>rm -v dummy.c a.out</userinput></screen>
+
+  </caution>
+
   </sect2>
 
   <sect2 role="content">

-- 
http://linuxfromscratch.org/mailman/listinfo/hlfs-book
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to