Skip to content

Commit 5fe613b

Browse files
CodingVoidcrawfxrd
authored andcommitted
util/crossgcc/buildgcc: Fix GMP build on GCC 15
Currently building GMP with GCC 15 causes this error: "configure: error: could not find a working compiler, see config.log for details" GCC 15 by default uses std=gnu23 but that causes the build of GMP to fail. So hardcode it to always build GMP using std=gnu17. Once GMP is fixed in their next release, we can remove this again. source: https://gmplib.org/list-archives/gmp-bugs/2024-November/005550.html Signed-off-by: Maximilian Brune <[email protected]> Change-Id: I7813ff18e8e486bece503652af69de1db93958b2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87650 Reviewed-by: Angel Pons <[email protected]> Tested-by: build bot (Jenkins) <[email protected]>
1 parent dda426e commit 5fe613b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

util/crossgcc/buildgcc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,9 @@ build_GMP() {
654654
fi
655655

656656
# shellcheck disable=SC2086
657-
CC="$(hostcc host)" CXX="$(hostcxx host)" \
657+
# Bug: GMP currently does not support being build by GCC 15 (--std=gnu23)
658+
# Remove CFLAGS once it works again.
659+
CC="$(hostcc host)" CXX="$(hostcxx host)" CFLAGS="-std=gnu17" \
658660
../${GMP_DIR}/configure \
659661
--disable-shared \
660662
--enable-fat \

0 commit comments

Comments
 (0)