diff options
author | Leah Rowe <leah@libreboot.org> | 2025-04-29 21:18:06 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-04-29 22:16:09 +0100 |
commit | 9a9cd26b2d54aa0f58ebe91d57cbfb645d2c545a (patch) | |
tree | 02da189c9f9ba11c618252843e28c11e6fb261f9 /config/coreboot/default/patches | |
parent | 80007223c853d9a4e07e983cad7ad61b42637542 (diff) |
coreboot/default and fam15h: gmp fix, gcc15 hostcc
gcc 15 defaults to -std=c23, but the older gcc was
using -std=c17. The new c23 breaks GMP, so let's add
a patch from upstream (GMP project) to fix it.
this has been done to both coreboot trees.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/coreboot/default/patches')
-rw-r--r-- | config/coreboot/default/patches/0041-crossgcc-gmp-Add-upstream-fix-for-GCC-15.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/config/coreboot/default/patches/0041-crossgcc-gmp-Add-upstream-fix-for-GCC-15.patch b/config/coreboot/default/patches/0041-crossgcc-gmp-Add-upstream-fix-for-GCC-15.patch new file mode 100644 index 00000000..1d0b6072 --- /dev/null +++ b/config/coreboot/default/patches/0041-crossgcc-gmp-Add-upstream-fix-for-GCC-15.patch @@ -0,0 +1,71 @@ +From ee3925486f3567b9fe45cb98a88b9acc64991127 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Tue, 29 Apr 2025 21:15:22 +0100 +Subject: [PATCH 1/1] crossgcc/gmp: Add upstream fix for GCC 15 + +See: +https://gmplib.org/list-archives/gmp-devel/2025-January/006279.html + +by default, upstream GCC-15 now defaults to -std=c23, instead +of -std=c17, which can cause some build issues. + +GMP has this patch on their mailing list for GCC-15 (see link). + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + .../gmp-6.3.0_acinclude-m4-fix-std-c23.patch | 43 +++++++++++++++++++ + 1 file changed, 43 insertions(+) + create mode 100644 util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23.patch + +diff --git a/util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23.patch b/util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23.patch +new file mode 100644 +index 0000000000..b884b62df7 +--- /dev/null ++++ b/util/crossgcc/patches/gmp-6.3.0_acinclude-m4-fix-std-c23.patch +@@ -0,0 +1,43 @@ ++From b1b61bc8ab19659f0fb8c0f87edcd79ae1bfef7e Mon Sep 17 00:00:00 2001 ++From: Rudi Heitbaum <rudi@heitbaum.com> ++Date: Wed, 22 Jan 2025 02:34:09 +0100 ++Subject: [PATCH 1/1] acinclude.m4: fix -std=c23 build failure ++ ++Add prototype to configure test function as c23 removes unprototyped ++functions. ++ ++gcc-15 switched to -std=c23 by default: ++ ++ https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 ++ ++As a result `configure` fails with: ++ conftest.c: In function 'f': ++ conftest.c:12:48: error: too many arguments to function 'g'; expected 0, have 6 ++ 12 | for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}} ++ | ^ ~ ++ conftest.c:7:6: note: declared here ++ 7 | void g(){} ++ | ^ ++ ++Link: https://gmplib.org/list-archives/gmp-bugs/2024-November/005550.html ++Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> ++--- ++ acinclude.m4 | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/acinclude.m4 b/acinclude.m4 ++index 9cf9483..1eed843 100644 ++--- a/acinclude.m4 +++++ b/acinclude.m4 ++@@ -609,7 +609,7 @@ GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 1], ++ ++ #if defined (__GNUC__) && ! defined (__cplusplus) ++ typedef unsigned long long t1;typedef t1*t2; ++-void g(){} +++void g(int,const t1 *,t1,t1 *,const t1 *,int){} ++ void h(){} ++ static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0) ++ {t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;} ++-- ++2.39.5 ++ +-- +2.39.5 + |