From fce81a1f11ee584449d83940a270e0b80ea59c26 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Tue, 23 Dec 2025 20:15:04 +0000 Subject: [PATCH] Fix build of GMP 6.3.0 on older versions of GCC, such as GCC 9. The previous commit c145e3c337b63b4b5939e567cd4e654db02680a7 resolves the issue for GCC 15. However, omitting parameter names in function definitions is a C23 feature. This thus causes configuration to fail with a GCC 9 host compiler. Signed-off-by: Sam Nazarko --- .../gmp/001-fix-function-prototype.patch | 31 +++++++++++++++++++ .../gmp/001-gcc15-fix-compilation.patch | 24 -------------- 2 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 depends/common/gmp/001-fix-function-prototype.patch delete mode 100644 depends/common/gmp/001-gcc15-fix-compilation.patch diff --git a/depends/common/gmp/001-fix-function-prototype.patch b/depends/common/gmp/001-fix-function-prototype.patch new file mode 100644 index 00000000..d61285d7 --- /dev/null +++ b/depends/common/gmp/001-fix-function-prototype.patch @@ -0,0 +1,31 @@ +From: Marc Glisse +Date: Wed, 29 Jan 2025 22:38:02 +0100 +Subject: [PATCH] Complete function prototype in acinclude.m4 for C23 + compatibility +--- + acinclude.m4 | 2 +- + configure | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -609,7 +609,7 @@ + + #if defined (__GNUC__) && ! defined (__cplusplus) + typedef unsigned long long t1;typedef t1*t2; +-void g(){} ++void g(int p1,t1 const* p2,t1 p3,t2 p4,t1 const* p5,int p6){} + 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 -Date: Wed, 29 Jan 2025 22:38:02 +0100 -Subject: [PATCH] Complete function prototype in acinclude.m4 for C23 - compatibility - ---- - ChangeLog | 5 +++++ - acinclude.m4 | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index fddb5fb07..4fca12de2 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