Apologies if this issue stems from upstream coreboot.
When the host cc (/usr/bin/cc, /bin/cc) is linked to a compiler other than gcc (e.g., clang), the build fails.
There is no explicit error to detail that gcc is required - though I didn't believe otherwise.
In Debian, the Alternatives system is responsible for this link, and can be fixed accordingly:
sudo update-alternatives --set cc /usr/bin/gcc
This is an edge case, but may trip up anyone who has been using alternative compilers.
Well, coreboot is very cursed when built with Clang.
In general I would recommend GCC. I'm not sure how I would reliable detect what compiler the user has on their distro, because I normally just use GCC.
What do you recommend?
That Debian command you mentioned is nice, but it's debian-specific. I'd like to be distro-agnostic here.
I'd forgotten I'd changed cc as above, I didn't expect coreboot - or any monolithic software - to build against clang.
I mention it in the interest of preventing repeat occurrences and troubleshooting if cc != gcc.
cc != gcc
I don't see anything obvious in the coreboot sources, but I'm not familiar with the toolchain - make can be arcane.
I would suggest patching the source to explicitly define gcc, or wrap build to print a message when $? != 0, but neither of these are elegant.
$? != 0
Can you try it? Try modifying the Libreboot build system, accordingly and test it. Then issue a pull request and I'll test your change myself.