From 9484b1396fd04a400ef774b12413dfb82b7e8d1a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 14 Mar 2025 22:55:32 -0700 Subject: [PATCH] gmp: Fix build with GCC15/C23 Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...n-prototype-in-acinclude.m4-for-C23-.patch | 25 +++++++++++++++++++ meta/recipes-support/gmp/gmp_6.3.0.bb | 1 + 2 files changed, 26 insertions(+) create mode 100644 meta/recipes-support/gmp/gmp/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch diff --git a/meta/recipes-support/gmp/gmp/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch b/meta/recipes-support/gmp/gmp/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch new file mode 100644 index 00000000000..ee199a83735 --- /dev/null +++ b/meta/recipes-support/gmp/gmp/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch @@ -0,0 +1,25 @@ +From 51a657c827422d2bc284d752dfbcfd2b1311a5bf Mon Sep 17 00:00:00 2001 +From: Marc Glisse +Date: Wed, 29 Jan 2025 22:38:02 +0100 +Subject: [PATCH] Complete function prototype in acinclude.m4 for C23 + compatibility + +Upstream-Status: Backport [https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18] +Signed-off-by: Khem Raj +--- + acinclude.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 9cf9483..787511f 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,t1 const*,t1,t2,t1 const*,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