From 471df8ca5e9cea6099e23e7c373c7e72a16c5cf5 Mon Sep 17 00:00:00 2001 From: Maximilian Brune Date: Mon, 12 May 2025 20:25:55 +0200 Subject: [PATCH] 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 Change-Id: I7813ff18e8e486bece503652af69de1db93958b2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87650 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- util/crossgcc/buildgcc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 1b0c89ae1c..57aeb96ab5 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -654,7 +654,9 @@ build_GMP() { fi # shellcheck disable=SC2086 - CC="$(hostcc host)" CXX="$(hostcxx host)" \ + # Bug: GMP currently does not support being build by GCC 15 (--std=gnu23) + # Remove CFLAGS once it works again. + CC="$(hostcc host)" CXX="$(hostcxx host)" CFLAGS="-std=gnu17" \ ../${GMP_DIR}/configure \ --disable-shared \ --enable-fat \