mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
package/mpir: fix build with gcc >= 14.x
Backport an upstream patch fixing a build issue with gcc >= 14.x. Fixes: https://autobuild.buildroot.net/results/d144ec967b7db34de56eaf34bb436460b8c924ed/ Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
f45bec1edf
commit
9782cab084
31
package/mpir/0003-fix-configure-with-gcc-14.patch
Normal file
31
package/mpir/0003-fix-configure-with-gcc-14.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 4ff3b770cbf86e29b75d12c13e8b854c74bccc5a Mon Sep 17 00:00:00 2001
|
||||
From: Reno Dakota <paparodeo@proton.me>
|
||||
Date: Wed, 4 Dec 2024 23:09:03 +0000
|
||||
Subject: [PATCH] fix configure with gcc-14
|
||||
|
||||
move function definition above caller to fix compile error
|
||||
|
||||
> configure:6438: gcc -m64 conftest.c >&5
|
||||
> conftest.c: In function 'f':
|
||||
> conftest.c:13:44: error: implicit declaration of function 'h' [-Wimplicit-function-declaration]
|
||||
|
||||
Upstream: https://github.com/wbhart/mpir/commit/4ff3b770cbf86e29b75d12c13e8b854c74bccc5a
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
acinclude.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index 620a629ef..cd917567f 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -590,8 +590,8 @@ extern
|
||||
__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;}
|
||||
void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
|
||||
-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();}}
|
||||
void h(){} void g(){}
|
||||
+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();}}
|
||||
#else
|
||||
int dummy;
|
||||
#endif
|
||||
@@ -11,6 +11,7 @@ MPIR_LICENSE_FILES = COPYING.LIB
|
||||
MPIR_INSTALL_STAGING = YES
|
||||
MPIR_DEPENDENCIES = gmp host-yasm
|
||||
# 0002-Fix-configure-failures-with-Xcode12.patch
|
||||
# 0003-fix-configure-with-gcc-14.patch
|
||||
MPIR_AUTORECONF = YES
|
||||
|
||||
# We don't care about the documentation
|
||||
|
||||
Reference in New Issue
Block a user