Bug #240
closedcbfstool fails to build with old gcc due to compiler bugs
0%
Description
Steps to Reproduce¶
- Choose any chipset
- Select GRUB2 as payload
- make crossgcc-i386 CPUS=6 #succeeds
- make
Output¶
Build failure
Host Machine GCC version¶
4.8.5
Logs ¶
Attached
Remedy¶
Update host machine GCC to latest version available : gcc-8.
Comments¶
However, coreboot should be able to use the internal toolchain built above in step 3, to make step 4. But looks like its dependent on the host compiler.
Files
Updated by Angel Pons almost 5 years ago
Looks like what fails to build is cbfstool: make: *** [build/util/cbfstool/cbfstool.o] Error 1
. Looks like it is built using the system toolchain, but maybe it should be built by crossgcc when building coreboot.
Updated by Paul Menzel almost 5 years ago
What is the system GLIBC version? See https://review.coreboot.org/c/coreboot/+/38638 for a fix.
Updated by Patrick Georgi over 4 years ago
- Subject changed from Coreboot fails to build to cbfstool fails to build with old gcc due to compiler bugs
- Status changed from New to In Progress
cbfstool is always built with the host compiler and the cross toolchain is completely unsuitable for that.
This error doesn't seem to be related to glibc (which https://review.coreboot.org/38638 fixes), but to a compiler bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449. It was also reported on the list at https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/message/HY2OB7IN5QU2T6Q7FSY5YMDFRJFXXWDM/, the affected compiler in that case was gcc 4.8.4, and I could reproduce the issue on a centos 7 system.
https://review.coreboot.org/c/coreboot/+/43143 and https://review.coreboot.org/c/coreboot/+/43144 force the creation of the bootstrap compiler for gcc < 4.9 and tell xcompile to look for a host compiler in the cross compiler directory when collecting compilers, which should resolve the issue (after running crossgcc.)
Updated by Patrick Georgi over 4 years ago
- Status changed from In Progress to Resolved
Resolved by https://review.coreboot.org/c/coreboot/+/43143, https://review.coreboot.org/c/coreboot/+/43144 and https://review.coreboot.org/c/coreboot/+/43145: Creating a toolchain with a host compiler older than gcc 4.9 now leads to a bootstrap build, and the bootstrap compiler is picked up as host compiler by default.