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.
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.
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.
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.
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`.
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.
re-opening. i've decided recently i do want to work on making the build system more portable. including removing bashisms etc from bash scripts. plus, coreboot has some llvm support
it's worth looking into other compilers besides gnu ones
re-opening. i've decided recently i do want to work on making the build system more portable. including removing bashisms etc from bash scripts. plus, coreboot has some llvm support
it's worth looking into other compilers besides gnu ones
Apologies if this issue stems from upstream coreboot.
When the host
cc
(/usr/bin/cc
,/bin/cc
) is linked to a compiler other thangcc
(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 expectcoreboot
- or any monolithic software - to build againstclang
.I mention it in the interest of preventing repeat occurrences and troubleshooting if
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 wrapbuild
to print a message when$? != 0
, but neither of these are elegant.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.
i've decided to regard this as a non-bug
GCC is required, and supporting other compilers is not worth the effort
re-opening. i've decided recently i do want to work on making the build system more portable. including removing bashisms etc from bash scripts. plus, coreboot has some llvm support
it's worth looking into other compilers besides gnu ones
redundant now, coreboot's clang support improved