Bläddra i källkod

gmp: fix gcc 15 build (#7336)

Saikari 1 månad sedan
förälder
incheckning
a903fe9749
2 ändrade filer med 13 tillägg och 0 borttagningar
  1. 12 0
      packages/g/gmp/patches/6.3.0/gmp-gcc-15.patch
  2. 1 0
      packages/g/gmp/xmake.lua

+ 12 - 0
packages/g/gmp/patches/6.3.0/gmp-gcc-15.patch

@@ -0,0 +1,12 @@
+--- configure
++++ configure
+@@ -6568,7 +6568,7 @@
+
+ #if defined (__GNUC__) && ! defined (__cplusplus)
+ typedef unsigned long long t1;typedef t1*t2;
+-void g(){}
++void g(int a,t1 const* b,t1 c,t2 d,t1 const* e,int f){}
+ 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;}
+

+ 1 - 0
packages/g/gmp/xmake.lua

@@ -9,6 +9,7 @@ package("gmp")
     add_urls("https://gmplib.org/download/gmp/gmp-$(version).tar.xz")
     add_versions("6.2.1", "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2")
     add_versions("6.3.0", "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898")
+    add_patches("6.3.0", "patches/6.3.0/gmp-gcc-15.patch", "c9be4854bee73af5ea028fcb6ed5ba5627d40f259d46bcfee4cd67e613173f7b")
 
     if is_plat("mingw") and is_subhost("msys") then
         add_extsources("pacman::gmp")