From 98689cf8710dff1e89f69bbc6991db16d2edd901 Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Sat, 5 Apr 2025 10:13:25 +0800 Subject: [PATCH] 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 Signed-off-by: Sam James --- sys-firmware/seabios/seabios-1.16.3.ebuild | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys-firmware/seabios/seabios-1.16.3.ebuild b/sys-firmware/seabios/seabios-1.16.3.ebuild index 46cb65492f784..872b3499147cd 100644 --- a/sys-firmware/seabios/seabios-1.16.3.ebuild +++ b/sys-firmware/seabios/seabios-1.16.3.ebuild @@ -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() {