Project

General

Profile

Actions

Bug #240

closed

cbfstool fails to build with old gcc due to compiler bugs

Added by Naveen Chaudhary over 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Start date:
10/27/2019
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

Steps to Reproduce

  1. Choose any chipset
  2. Select GRUB2 as payload
  3. make crossgcc-i386 CPUS=6 #succeeds
  4. 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

coreboot_build_failure_logs (8.53 KB) coreboot_build_failure_logs Naveen Chaudhary, 10/27/2019 11:09 AM
Actions #1

Updated by Angel Pons about 4 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.

Actions #2

Updated by Paul Menzel about 4 years ago

What is the system GLIBC version? See https://review.coreboot.org/c/coreboot/+/38638 for a fix.

Actions #3

Updated by Patrick Georgi almost 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.)

Actions #4

Updated by Patrick Georgi almost 4 years ago

  • Assignee set to Patrick Georgi
Actions #5

Updated by Patrick Georgi almost 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.

Actions

Also available in: Atom PDF