summaryrefslogtreecommitdiff
path: root/config/coreboot/fam15h/patches
diff options
context:
space:
mode:
Diffstat (limited to 'config/coreboot/fam15h/patches')
-rw-r--r--config/coreboot/fam15h/patches/0015-gmp-gcc15-patch.patch65
-rw-r--r--config/coreboot/fam15h/patches/0016-further-fix-for-std-c23-on-gmp-with-host-gcc-15.patch55
-rw-r--r--config/coreboot/fam15h/patches/0017-xgcc-update-nasm-to-2.16.03.patch44
3 files changed, 164 insertions, 0 deletions
diff --git a/config/coreboot/fam15h/patches/0015-gmp-gcc15-patch.patch b/config/coreboot/fam15h/patches/0015-gmp-gcc15-patch.patch
new file mode 100644
index 00000000..40ea7c14
--- /dev/null
+++ b/config/coreboot/fam15h/patches/0015-gmp-gcc15-patch.patch
@@ -0,0 +1,65 @@
+From 8663b2a75d69aa241f86dd6e813232343a05b609 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Tue, 29 Apr 2025 21:26:25 +0100
+Subject: [PATCH 1/1] gmp gcc15 patch
+
+https://gmplib.org/list-archives/gmp-devel/2025-January/006279.html
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ ...include.m4-fix-std-c23-build-failure.patch | 43 +++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+ create mode 100644 util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure.patch
+
+diff --git a/util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure.patch b/util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure.patch
+new file mode 100644
+index 0000000000..adb66c6043
+--- /dev/null
++++ b/util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure.patch
+@@ -0,0 +1,43 @@
++From 7d4aa08224b53054754b8ee6fd61a4297ac47119 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 3c3ecf5..3a226fd 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
+
diff --git a/config/coreboot/fam15h/patches/0016-further-fix-for-std-c23-on-gmp-with-host-gcc-15.patch b/config/coreboot/fam15h/patches/0016-further-fix-for-std-c23-on-gmp-with-host-gcc-15.patch
new file mode 100644
index 00000000..1287a02d
--- /dev/null
+++ b/config/coreboot/fam15h/patches/0016-further-fix-for-std-c23-on-gmp-with-host-gcc-15.patch
@@ -0,0 +1,55 @@
+From 8c3a1163eb24a608ad14747cd40169fb5a41d4f9 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Tue, 29 Apr 2025 23:18:56 +0100
+Subject: [PATCH 1/1] further fix for std=c23 on gmp with host gcc-15
+
+the fix had to be applied in the configure file, so that
+the correct function call is generated in conftest.c
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ ...e.m4-fix-std-c23-build-failure-extra.patch | 32 +++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+ create mode 100644 util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure-extra.patch
+
+diff --git a/util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure-extra.patch b/util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure-extra.patch
+new file mode 100644
+index 0000000000..40569b27d8
+--- /dev/null
++++ b/util/crossgcc/patches/gmp-6.1.2_acinclude.m4-fix-std-c23-build-failure-extra.patch
+@@ -0,0 +1,32 @@
++From 6316016cfe6834b6d3242e7e088b7d2af91ada22 Mon Sep 17 00:00:00 2001
++From: Leah Rowe <leah@libreboot.org>
++Date: Tue, 29 Apr 2025 23:16:51 +0100
++Subject: [PATCH 1/1] further -std=23 gcc-15 fix for gmp
++
++the previously merged revision was correct, but
++applied in the wrong place. the conftest.c file
++was being generated by configure, in this place.
++
++this should fix build errors now, on gcc-15.
++
++Signed-off-by: Leah Rowe <leah@libreboot.org>
++---
++ configure | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/configure b/configure
++index 12ddffd..8b07818 100755
++--- a/configure
+++++ b/configure
++@@ -6458,7 +6458,7 @@ if test "$gmp_prog_cc_works" = yes; then
++
++ #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
+
diff --git a/config/coreboot/fam15h/patches/0017-xgcc-update-nasm-to-2.16.03.patch b/config/coreboot/fam15h/patches/0017-xgcc-update-nasm-to-2.16.03.patch
new file mode 100644
index 00000000..8dc52ac9
--- /dev/null
+++ b/config/coreboot/fam15h/patches/0017-xgcc-update-nasm-to-2.16.03.patch
@@ -0,0 +1,44 @@
+From 0d639c485bdf136e4c5ac7af81fc12da3f21bc46 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Wed, 30 Apr 2025 04:07:31 +0100
+Subject: [PATCH 1/1] xgcc: update nasm to 2.16.03
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ util/crossgcc/buildgcc | 2 +-
+ util/crossgcc/sum/nasm-2.14.02.tar.bz2.cksum | 1 -
+ util/crossgcc/sum/nasm-2.16.03.tar.bz2.cksum | 1 +
+ 3 files changed, 2 insertions(+), 2 deletions(-)
+ delete mode 100644 util/crossgcc/sum/nasm-2.14.02.tar.bz2.cksum
+ create mode 100644 util/crossgcc/sum/nasm-2.16.03.tar.bz2.cksum
+
+diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
+index 0ad1980104..2d48ff038e 100755
+--- a/util/crossgcc/buildgcc
++++ b/util/crossgcc/buildgcc
+@@ -61,7 +61,7 @@ EXPAT_VERSION=2.2.7
+ CLANG_VERSION=8.0.0
+ MAKE_VERSION=4.2.1
+ CMAKE_VERSION=3.15.3
+-NASM_VERSION=2.14.02
++NASM_VERSION=2.16.03
+
+ # GCC toolchain archive locations
+ # These are sanitized by the jenkins toolchain test builder, so if
+diff --git a/util/crossgcc/sum/nasm-2.14.02.tar.bz2.cksum b/util/crossgcc/sum/nasm-2.14.02.tar.bz2.cksum
+deleted file mode 100644
+index f3b9de9d29..0000000000
+--- a/util/crossgcc/sum/nasm-2.14.02.tar.bz2.cksum
++++ /dev/null
+@@ -1 +0,0 @@
+-fe098ee4dc9c4c983696c4948e64b23e4098b92b tarballs/nasm-2.14.02.tar.bz2
+diff --git a/util/crossgcc/sum/nasm-2.16.03.tar.bz2.cksum b/util/crossgcc/sum/nasm-2.16.03.tar.bz2.cksum
+new file mode 100644
+index 0000000000..9ca23fb0c4
+--- /dev/null
++++ b/util/crossgcc/sum/nasm-2.16.03.tar.bz2.cksum
+@@ -0,0 +1 @@
++c63080347a5c1c8904456fe6c680b722558383b4 tarballs/nasm-2.16.03.tar.bz2
+--
+2.39.5
+