
Linux From Scratch - Version 7.0
106
Important
In this section, the test suite for GCC is considered critical. Do not skip it under any circumstance.
One set of tests in the GCC test suite is known to exhaust the stack, so increase the stack size prior to running the tests:
ulimit -s 16384
Test the results, but do not stop at errors:
make -k check
To receive a summary of the test suite results, run:
../gcc-4.6.1/contrib/test_summary
For only the summaries, pipe the output through grep -A7 Summ.
Results can be compared with those located at http://www.linuxfromscratch.org/lfs/build-logs/7.0/ and http://gcc.gnu.
org/ml/gcc-testresults/.
A few unexpected failures cannot always be avoided. The GCC developers are usually aware of these issues, but have
not resolved them yet. In particular, the libmudflap tests are known be particularly problematic as a result of a
bug in GCC (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20003). Unless the test results are vastly different from
those at the above URL, it is safe to continue.
Install the package:
make install
Some packages expect the C preprocessor to be installed in the /lib directory. To support those packages, create
this symlink:
ln -sv ../usr/bin/cpp /lib
Many packages use the name cc to call the C compiler. To satisfy those packages, create a symlink:
ln -sv gcc /usr/bin/cc
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:
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
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):
[Requesting program interpreter: /lib/ld-linux.so.2]
Now make sure that we're setup to use the correct startfiles:
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
Kommentare zu diesen Handbüchern