diff options
author | Greg Schafer <greg@linuxfromscratch.org> | 2003-09-16 07:28:26 +0000 |
---|---|---|
committer | Greg Schafer <greg@linuxfromscratch.org> | 2003-09-16 07:28:26 +0000 |
commit | 1f536265dd95eaecbd3d666a788351c108caee35 (patch) | |
tree | 553eb85dda1c08d57c167033a9ff8b8ac1bd7302 | |
parent | 18b65e2b0aa0a063ed09d4f464d8ab4dc2231898 (diff) |
Add sanity checks and some notes on the toolchain testsuites.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2825 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter01/changelog.xml | 6 | ||||
-rw-r--r-- | chapter05/binutils-pass1-inst.xml | 5 | ||||
-rw-r--r-- | chapter05/binutils-pass2-inst.xml | 4 | ||||
-rw-r--r-- | chapter05/gcc-pass1-inst.xml | 5 | ||||
-rw-r--r-- | chapter05/gcc-pass2-inst.xml | 3 | ||||
-rw-r--r-- | chapter05/glibc-inst.xml | 4 | ||||
-rw-r--r-- | chapter05/lockingglibc.xml | 29 | ||||
-rw-r--r-- | chapter06/adjustingtoolchain.xml | 28 | ||||
-rw-r--r-- | chapter06/binutils-inst.xml | 4 | ||||
-rw-r--r-- | chapter06/gcc-inst.xml | 3 | ||||
-rw-r--r-- | chapter06/glibc-inst.xml | 3 | ||||
-rw-r--r-- | index.xml | 4 |
12 files changed, 96 insertions, 2 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index b374bef09..0937526cf 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -87,6 +87,12 @@ </itemizedlist> </para></listitem> +<listitem><para>September 16th, 2003 [greg]: Chapters 5 and 6 - Locking in +Glibc and Re-adjusting the toolchain: Added sanity checks.</para></listitem> + +<listitem><para>September 16th, 2003 [greg]: Chapters 5 and 6 - Binutils, GCC, +and Glibc: Added notes on the test suites.</para></listitem> + <listitem><para>September 14th, 2003 [greg]: Chapter 6 - Revised chroot command: Removed no longer needed set +h.</para></listitem> diff --git a/chapter05/binutils-pass1-inst.xml b/chapter05/binutils-pass1-inst.xml index 5701e5960..9e02b5f86 100644 --- a/chapter05/binutils-pass1-inst.xml +++ b/chapter05/binutils-pass1-inst.xml @@ -7,6 +7,11 @@ because both Glibc and GCC perform various tests on the available linker and assembler to determine which of their own features to enable.</para> +<note><para>Even though Binutils is an important toolchain package, we are not +going to run the testsuite at this early stage. Firstly, the testsuite +framework is not yet in place and secondly, the programs from this first pass +will soon be overwritten by those installed in the second pass.</para></note> + <para>This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override default diff --git a/chapter05/binutils-pass2-inst.xml b/chapter05/binutils-pass2-inst.xml index 5a5fd5571..fbd555389 100644 --- a/chapter05/binutils-pass2-inst.xml +++ b/chapter05/binutils-pass2-inst.xml @@ -3,6 +3,10 @@ <sect2> <title>Re-installation of Binutils</title> +<note><para>It's worth noting that the Binutils testsuite we run in this +chapter is considered not as critical as the one we run in Chapter 6.</para> +</note> + <para>First create a separate build directory again:</para> <para><screen><userinput>mkdir ../binutils-build diff --git a/chapter05/gcc-pass1-inst.xml b/chapter05/gcc-pass1-inst.xml index a36310b2a..5b39c34ea 100644 --- a/chapter05/gcc-pass1-inst.xml +++ b/chapter05/gcc-pass1-inst.xml @@ -6,6 +6,11 @@ <para>Unpack only the GCC-core tarball, as we won't be needing a C++ compiler for the moment.</para> +<note><para>Even though GCC is an important toolchain package, we are not +going to run the testsuite at this early stage. Firstly, the testsuite +framework is not yet in place and secondly, the programs from this first pass +will soon be overwritten by those installed in the second pass.</para></note> + <para>This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override diff --git a/chapter05/gcc-pass2-inst.xml b/chapter05/gcc-pass2-inst.xml index a25d48703..28fa51213 100644 --- a/chapter05/gcc-pass2-inst.xml +++ b/chapter05/gcc-pass2-inst.xml @@ -11,6 +11,9 @@ supported by your host distribution. Most notably, a host distribution which does not properly support the devpts filesystem will cause most of these tests to fail.</para> +<note><para>It's worth noting that the GCC testsuite we run in this chapter is +considered not as critical as the one we run in Chapter 6.</para></note> + <para>Unpack all three GCC tarballs in one and the same working directory. They will all unfold into a single <filename>gcc-&gcc-version;/</filename> subdir.</para> diff --git a/chapter05/glibc-inst.xml b/chapter05/glibc-inst.xml index d1c3e9137..fd83fb545 100644 --- a/chapter05/glibc-inst.xml +++ b/chapter05/glibc-inst.xml @@ -8,6 +8,10 @@ into the <filename>glibc-&glibc-version;</filename> directory and unpack Glibc-linuxthreads in that directory, not in <filename>/usr/src</filename> as you would normally do.</para> +<note><para>We are going to run the testsuite for Glibc in this chapter. +However, it's worth noting that the Glibc testsuite we run in this chapter is +considered not as critical as the one we run in Chapter 6.</para></note> + <para>This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml index bd15b4a7f..285de303c 100644 --- a/chapter05/lockingglibc.xml +++ b/chapter05/lockingglibc.xml @@ -45,6 +45,35 @@ following commands to eliminate this possibility.</para> <para><screen><userinput>rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen></para> +<caution><para>It is imperative at this point to stop and ensure that the +basic functionality of the new toolchain is working as expected. We are going +to perform a simple sanity check:</para> + +<para><screen><userinput>echo 'main(){}' > dummy.c +gcc dummy.c +readelf -l a.out | grep ': /tools'</userinput></screen></para> + +<para>If everything is working correctly, the output of the last command will +be:</para> + +<para><screen>[Requesting program interpreter: /tools/lib/ld-linux.so.2] +</screen></para> + +<para>If you did not receive the output as shown above then something is +seriously wrong. You will need to investigate and retrace your steps to find +out where the problem is and correct it. There is no point in continuing +until this is done. Most likely, something went wrong with the specs file +amendment above. Note especially that <filename>/tools/lib</filename> appears +as the prefix of our dynamic linker. Of course, if you are working on a +platform where the name of the dynamic linker is something other than +<filename>ld-linux.so.2</filename> then the output will be slightly different. +</para> + +<para>Once you are satisfied that all is well, clean up the test files:</para> + +<para><screen><userinput>rm dummy.c a.out</userinput></screen></para> +</caution> + <para>This completes the installation of the self-contained toolchain, which can now be used to build the rest of the temporary tools.</para> diff --git a/chapter06/adjustingtoolchain.xml b/chapter06/adjustingtoolchain.xml index fd5ba1676..522727785 100644 --- a/chapter06/adjustingtoolchain.xml +++ b/chapter06/adjustingtoolchain.xml @@ -43,5 +43,33 @@ is unavoidable, but luckily does not present a problem. There are no libraries in that location as all the temporary tools libraries are located in <filename class="directory">/tools/lib</filename>.</para> +<caution><para>It is imperative at this point to stop and ensure that the +basic functionality of the adjusted toolchain is working as expected. We are +going to perform a simple sanity check:</para> + +<para><screen><userinput>echo 'main(){}' > dummy.c +gcc dummy.c +readelf -l a.out | grep ': /lib'</userinput></screen></para> + +<para>If everything is working correctly, the output of the last command will +be:</para> + +<para><screen>[Requesting program interpreter: /lib/ld-linux.so.2] +</screen></para> + +<para>If you did not receive the output as shown above then something is +seriously wrong. You will need to investigate and retrace your steps to find +out where the problem is and correct it. There is no point in continuing +until this is done. Most likely, something went wrong with the specs file +amendment above. Note especially that <filename>/lib</filename> now appears as +the prefix of our dynamic linker. Of course, if you are working on a platform +where the name of the dynamic linker is something other than <filename> +ld-linux.so.2</filename> then the output will be slightly different.</para> + +<para>Once you are satisfied that all is well, clean up the test files:</para> + +<para><screen><userinput>rm dummy.c a.out</userinput></screen></para> +</caution> + </sect1> diff --git a/chapter06/binutils-inst.xml b/chapter06/binutils-inst.xml index d55f9b49a..c414e52a4 100644 --- a/chapter06/binutils-inst.xml +++ b/chapter06/binutils-inst.xml @@ -2,6 +2,10 @@ <sect2><title>Installation of Binutils</title> +<note><para>The testsuite for Binutils in this chapter is considered +<emphasis>critical</emphasis>. Do not skip it under any circumstances.</para> +</note> + <para>This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override diff --git a/chapter06/gcc-inst.xml b/chapter06/gcc-inst.xml index 5e5dab528..21e22c55c 100644 --- a/chapter06/gcc-inst.xml +++ b/chapter06/gcc-inst.xml @@ -3,6 +3,9 @@ <sect2> <title>Installation of GCC</title> +<note><para>The testsuite for GCC in this chapter is considered <emphasis> +critical</emphasis>. Do not skip it under any circumstances.</para></note> + <para>This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index 376bbdacf..099dc4dc9 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -9,6 +9,9 @@ pointing at <filename>/tools</filename>. We cannot adjust the specs and ldscripts before the Glibc install, because the Glibc autoconf tests would then give bogus results and thus defeat our goal of achieving a clean build.</para> +<note><para>The testsuite for Glibc in this chapter is considered <emphasis> +critical</emphasis>. Do not skip it under any circumstances.</para></note> + <para>Before starting to build Glibc, remember to unpack the Glibc-linuxthreads again inside the <filename>glibc-&glibc-version;</filename> directory, and to unset any environment variables that override the default optimization @@ -3,8 +3,8 @@ "/usr/share/docbook/docbookx.dtd" [ -<!ENTITY version "20030915"> -<!ENTITY releasedate "September 15th, 2003"> +<!ENTITY version "20030916"> +<!ENTITY releasedate "September 16th, 2003"> <!ENTITY nbsp " "> <!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org"> |