diff options
author | Jeremy Huntwork <jhuntwork@linuxfromscratch.org> | 2006-05-03 02:37:49 +0000 |
---|---|---|
committer | Jeremy Huntwork <jhuntwork@linuxfromscratch.org> | 2006-05-03 02:37:49 +0000 |
commit | 09f1daf45389f406a5225fa829e896d87e3a140b (patch) | |
tree | 48f5a9ee32058588b35681f31d52eeb2dc1ee3a4 | |
parent | fffff976f53bf9b861809ef6a8c61c5a4d6bf580 (diff) |
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
-rw-r--r-- | chapter01/changelog.xml | 4 | ||||
-rw-r--r-- | chapter06/gcc.xml | 100 | ||||
-rw-r--r-- | chapter06/readjusting.xml | 83 |
3 files changed, 141 insertions, 46 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 060fc63f8..bf1f409bb 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -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> diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index 75075e4f8..eef7c302e 100644 --- a/chapter06/gcc.xml +++ b/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> diff --git a/chapter06/readjusting.xml b/chapter06/readjusting.xml index e108286f0..3107168fa 100644 --- a/chapter06/readjusting.xml +++ b/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(){}' > 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>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> |