mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-07-04 11:34:36 +01:00
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
This commit is contained in:
parent
18b65e2b0a
commit
1f536265dd
@ -87,6 +87,12 @@
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para></listitem>
|
</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
|
<listitem><para>September 14th, 2003 [greg]: Chapter 6 - Revised chroot
|
||||||
command: Removed no longer needed set +h.</para></listitem>
|
command: Removed no longer needed set +h.</para></listitem>
|
||||||
|
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
because both Glibc and GCC perform various tests on the available linker and
|
because both Glibc and GCC perform various tests on the available linker and
|
||||||
assembler to determine which of their own features to enable.</para>
|
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
|
<para>This package is known to behave badly when you have changed its default
|
||||||
optimization flags (including the -march and -mcpu options). Therefore, if
|
optimization flags (including the -march and -mcpu options). Therefore, if
|
||||||
you have defined any environment variables that override default
|
you have defined any environment variables that override default
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>Re-installation of Binutils</title>
|
<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>First create a separate build directory again:</para>
|
||||||
|
|
||||||
<para><screen><userinput>mkdir ../binutils-build
|
<para><screen><userinput>mkdir ../binutils-build
|
||||||
|
@ -6,6 +6,11 @@
|
|||||||
<para>Unpack only the GCC-core tarball, as we won't be needing a C++ compiler
|
<para>Unpack only the GCC-core tarball, as we won't be needing a C++ compiler
|
||||||
for the moment.</para>
|
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
|
<para>This package is known to behave badly when you have changed its
|
||||||
default optimization flags (including the -march and -mcpu options).
|
default optimization flags (including the -march and -mcpu options).
|
||||||
Therefore, if you have defined any environment variables that override
|
Therefore, if you have defined any environment variables that override
|
||||||
|
@ -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
|
which does not properly support the devpts filesystem will cause most of
|
||||||
these tests to fail.</para>
|
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.
|
<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>
|
They will all unfold into a single <filename>gcc-&gcc-version;/</filename>
|
||||||
subdir.</para>
|
subdir.</para>
|
||||||
|
@ -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
|
Glibc-linuxthreads in that directory, not in <filename>/usr/src</filename> as
|
||||||
you would normally do.</para>
|
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
|
<para>This package is known to behave badly when you have changed its
|
||||||
default optimization flags (including the -march and -mcpu options).
|
default optimization flags (including the -march and -mcpu options).
|
||||||
Therefore, if you have defined any environment variables that override
|
Therefore, if you have defined any environment variables that override
|
||||||
|
@ -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>
|
<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
|
<para>This completes the installation of the self-contained toolchain, which
|
||||||
can now be used to build the rest of the temporary tools.</para>
|
can now be used to build the rest of the temporary tools.</para>
|
||||||
|
|
||||||
|
@ -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
|
libraries in that location as all the temporary tools libraries are
|
||||||
located in <filename class="directory">/tools/lib</filename>.</para>
|
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>
|
</sect1>
|
||||||
|
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
<sect2><title>Installation of Binutils</title>
|
<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
|
<para>This package is known to behave badly when you have changed its
|
||||||
default optimization flags (including the -march and -mcpu options).
|
default optimization flags (including the -march and -mcpu options).
|
||||||
Therefore, if you have defined any environment variables that override
|
Therefore, if you have defined any environment variables that override
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>Installation of GCC</title>
|
<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
|
<para>This package is known to behave badly when you have changed its
|
||||||
default optimization flags (including the -march and -mcpu options).
|
default optimization flags (including the -march and -mcpu options).
|
||||||
Therefore, if you have defined any environment variables that override
|
Therefore, if you have defined any environment variables that override
|
||||||
|
@ -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
|
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>
|
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
|
<para>Before starting to build Glibc, remember to unpack the Glibc-linuxthreads
|
||||||
again inside the <filename>glibc-&glibc-version;</filename> directory, and to
|
again inside the <filename>glibc-&glibc-version;</filename> directory, and to
|
||||||
unset any environment variables that override the default optimization
|
unset any environment variables that override the default optimization
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"/usr/share/docbook/docbookx.dtd" [
|
"/usr/share/docbook/docbookx.dtd" [
|
||||||
|
|
||||||
|
|
||||||
<!ENTITY version "20030915">
|
<!ENTITY version "20030916">
|
||||||
<!ENTITY releasedate "September 15th, 2003">
|
<!ENTITY releasedate "September 16th, 2003">
|
||||||
<!ENTITY nbsp " ">
|
<!ENTITY nbsp " ">
|
||||||
|
|
||||||
<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
|
<!ENTITY ftp-root "ftp://ftp.linuxfromscratch.org">
|
||||||
|
Loading…
Reference in New Issue
Block a user