Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <553d29c8fcaebe78915149573fbe0ef9.mforney@mforney.org>
Date: Wed, 29 Apr 2026 21:49:49 -0700
From: Michael Forney <mforney@...rney.org>
To: musl@...ts.openwall.com
Subject: [PATCH musl-cross-make] Add gmp patch to fix configure with gcc 15

This is https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18 rebased on
gmp-6.3.0 with configure updated accordingly.

This fixes a configure test to be compatible with C23, which is the
default in gcc 15.

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(){}
      |      ^
configure:6588: $? = 1
<snip>
configure:7310: error: could not find a working compiler, see config.log for details
---
 ...n-prototype-in-acinclude.m4-for-C23-.patch | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 patches/gmp-6.3.0/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch

diff --git a/patches/gmp-6.3.0/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch b/patches/gmp-6.3.0/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch
new file mode 100644
index 0000000..24cdce2
--- /dev/null
+++ b/patches/gmp-6.3.0/0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch
@@ -0,0 +1,63 @@
+From 277f178c9a48dc55759741affc1d64d0cee26c96 Mon Sep 17 00:00:00 2001
+From: Marc Glisse <marc.glisse@...ia.fr>
+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 +-
+ configure    | 4 ++--
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 2902cd2e1..d2c97952c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,8 @@
++2025-01-29  Rudi Heitbaum <rudi@...tbaum.com>
++	    Marc Glisse <marc.glisse@...ia.fr>
++
++	* acinclude.m4: Complete function prototype.
++
+ 2023-07-29  Torbjörn Granlund  <tg@...lib.org>
+ 
+ 	* Version 6.3.0 released.
+diff --git a/acinclude.m4 b/acinclude.m4
+index 9cf9483e5..787511f28 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<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+diff --git a/configure b/configure
+index 7910aa097..fd1f49433 100755
+--- a/configure
++++ b/configure
+@@ -6568,7 +6568,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,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<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+@@ -8187,7 +8187,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,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<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+-- 
+2.49.0
+
-- 
2.49.0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.