Skip to content

Commit 189c350

Browse files
committed
Workaround build failures caused by GMP+GCC-15
refs compiler-explorer/compiler-explorer#7360 Signed-off-by: Marc Poulhiès <[email protected]>
1 parent bcd2361 commit 189c350

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ WORKDIR /opt
9090
COPY build/patches/crosstool-ng/ld_library_path.patch ./
9191

9292
COPY build/patches/crosstool-ng/gmp-6.3.0.patch ./
93+
COPY build/patches/crosstool-ng/0001-gcc-15-fix.patch ./
9394

9495
## TAG is pointing to a specific ct-ng revision (usually the current dev one
9596
## when updating this script or ct-ng)
@@ -99,6 +100,7 @@ RUN TAG=0842e659cb2297488175e1ba86b749c01e3b06f8 && \
99100
cd crosstool-ng-${TAG} && \
100101
patch -p1 < ../ld_library_path.patch && \
101102
patch -p1 < ../gmp-6.3.0.patch && \
103+
patch -p1 < ../0001-gcc-15-fix.patch && \
102104
./bootstrap && \
103105
./configure --prefix=/opt/crosstool-ng-latest && \
104106
make -j$(nproc) && \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 80a11dc3593a32a9ce14427509ed6b49ae8c6fe5 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= <[email protected]>
3+
Date: Tue, 4 Feb 2025 08:35:16 +0100
4+
Subject: [PATCH] gcc 15 fix
5+
6+
---
7+
packages/gmp/6.3.0/configure-compilation-error.patch | 11 +++++++++++
8+
1 file changed, 11 insertions(+)
9+
create mode 100644 packages/gmp/6.3.0/configure-compilation-error.patch
10+
11+
diff --git a/packages/gmp/6.3.0/configure-compilation-error.patch b/packages/gmp/6.3.0/configure-compilation-error.patch
12+
new file mode 100644
13+
index 00000000..1cf10070
14+
--- /dev/null
15+
+++ b/packages/gmp/6.3.0/configure-compilation-error.patch
16+
@@ -0,0 +1,11 @@
17+
+--- gmp-6.3.0/configure 2023-07-29 15:42:22.000000000 +0200
18+
++++ gmp/configure 2025-02-03 22:00:33.567817886 +0100
19+
+@@ -6568,7 +6566,7 @@
20+
+
21+
+ #if defined (__GNUC__) && ! defined (__cplusplus)
22+
+ typedef unsigned long long t1;typedef t1*t2;
23+
+-void g(){}
24+
++void g(int, const t1*, t1, t1*, const t1*, int){}
25+
+ void h(){}
26+
+ static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
27+
+ {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;}
28+
--
29+
2.47.2
30+

0 commit comments

Comments
 (0)