After working through Ch 6.21 to install gcc-8.2.0, everything succeeds and there were only 3 unexpected failures in libitm, all other numbers seem inline with the test results in the links provided.
Code:
# ../contrib/test_summary | grep -A7 Summ
=== g++ Summary ===
# of expected passes 125329
# of expected failures 504
# of unsupported tests 4930
/sources/gcc-8.2.0/build-lfs/gcc/xg++ version 8.2.0 (GCC)
=== gcc tests ===
--
=== gcc Summary ===
# of expected passes 135003
# of expected failures 393
# of unsupported tests 2129
/sources/gcc-8.2.0/build-lfs/gcc/xgcc version 8.2.0 (GCC)
=== libatomic tests ===
--
=== libatomic Summary ===
# of expected passes 54
=== libgomp tests ===
Running target unix
=== libgomp Summary ===
# of expected passes 1837
# of unsupported tests 192
=== libitm tests ===
Running target unix
--
=== libitm Summary ===
# of expected passes 42
# of expected failures 3
# of unsupported tests 1
=== libstdc++ tests ===
--
=== libstdc++ Summary ===
# of expected passes 11613
# of expected failures 71
# of unsupported tests 599
Compiler version: 8.2.0 (GCC)
Platform: x86_64-pc-linux-gnu
I installed gcc and made all of the symlinks as instructed, but after compiling the simple test program I see some unexpected results
Code:
readelf -l a.out | grep ': /lib'
Returned no output, but
Code:
readelf -l a.out | grep ': /tools'
shows
Code:
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
I patched the gcc specs file as in Ch 6.10 and re-compiled the example, and this resolves that error .... as you would expect.
Checking the other outputs shows the following
Code:
# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/../lib/crt1.o succeeded
/usr/lib/../lib/crti.o succeeded
/usr/lib/../lib/crtn.o succeeded
# grep -B4 '^ /usr/include' dummy.log
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include
# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
# grep "/lib.*/libc.so.6 " dummy.log
attempt to open /lib/libc.so.6 succeeded
# grep found dummy.log
found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2
All of these seem fine, apart from the compiler include search paths. The start files show a different output than expected, but they still point to the right folder location, so I am guessing that is ok.
These results are all the same, regardless of whether or not I patch the specs file to remove the tools reference.
Adjusting the toolchain in Ch 6.10 appears to have succeeded (the output of all of the checks returned the expected results). The only reference to the tools directory at this stage was in the linker search paths, but the paths that referenced the tools directory also had '-linux-gnu' (the paths started with =/tools), which Ch 6.10 says to ignore.
Code:
# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib")
My question here is, should I have needed to patch the specs file for this installation of gcc? My impression from Ch 6.21 is that I shouldn't have needed to do this. In which case, where did I go wrong?
My secondary question is, is the rest of the output ok? Or is this likely a side effect of still having that reference to the tools directory?