sys-firmware/seabios: force compiler to gcc

known incompatiable to clang are:
* error: unknown argument: '-mpreferred-stack-boundary=2'
* error: invalid input size for constraint 'Q' (inline asm)

so force gcc is obviously an easy option until upstream support clang

Closes: https://bugs.gentoo.org/887115
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Z. Liu
2025-04-05 10:13:25 +08:00
committed by Sam James
parent 9156135267
commit 98689cf871

View File

@@ -28,6 +28,7 @@ SLOT="0"
IUSE="debug +seavgabios"
BDEPEND="
sys-devel/gcc:*
>=sys-power/iasl-20060912
${PYTHON_DEPS}"
RDEPEND="!sys-firmware/seabios-bin"
@@ -71,6 +72,15 @@ src_prepare() {
# Ensure precompiled iasl files are never used
find "${WORKDIR}" -name '*.hex' -delete || die
# Force gcc because build failed with clang, #887115
if ! tc-is-gcc ; then
ewarn "seabios can be built with gcc only."
ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc"
export CC=${CHOST}-gcc
export CXX=${CHOST}-g++
tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}"
fi
}
src_configure() {