Skip to content

Commit 48b36cc

Browse files
Merge pull request #296 from flintlib/dependabot/github_actions/msys2/setup-msys2-2.28.0
Bump msys2/setup-msys2 from 2.27.0 to 2.28.0
2 parents c8713a9 + 15cdc31 commit 48b36cc

File tree

5 files changed

+47
-3
lines changed

5 files changed

+47
-3
lines changed

.github/workflows/buildwheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
python-version: '3.13'
2121

22-
- uses: msys2/setup-msys2@v2.27.0
22+
- uses: msys2/setup-msys2@v2.28.0
2323
with:
2424
msystem: mingw64
2525
# path-type inherit is used so that when cibuildwheel calls msys2 to

bin/build_dependencies_unix.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ do
4242
echo " --gmp gmp - build based on GMP (default)"
4343
echo " --gmp mpir - build based on MPIR (no longer works)"
4444
echo " --patch-gmp-arm64 - apply patch to GMP 6.2.1 for OSX arm64"
45+
echo " --patch-C23 - apply patch to GMP 6.3.0 for C23 compatibility"
4546
echo " --arb - build Arb (only needed for flint < 3.0.0)"
4647
echo
4748
exit
@@ -88,6 +89,11 @@ do
8889
PATCH_GMP_ARM64=yes
8990
shift
9091
;;
92+
--patch-C23)
93+
# Patch GMP 6.3.0 for newer gcc versions
94+
PATCH_GMP_C23=yes
95+
shift
96+
;;
9197
--use-gmp-github-mirror)
9298
USE_GMP_GITHUB_MIRROR=yes
9399
shift
@@ -164,6 +170,20 @@ if [ $USE_GMP = "gmp" ]; then
164170
echo --------------------------------------------
165171
patch -N -Z -p0 < ../../../bin/patch-arm64.diff
166172
fi
173+
#
174+
# https://github.com/msys2/MSYS2-packages/issues/5499
175+
#
176+
# This patch needed for GMP 6.3.0 building with msys2 or probably just
177+
# newer gcc versions.
178+
#
179+
if [ $PATCH_GMP_C23 = "yes" ]; then
180+
echo
181+
echo --------------------------------------------
182+
echo " patching GMP"
183+
echo --------------------------------------------
184+
patch -N -Z < ../../../bin/patch-C23.diff
185+
autoreconf -fi
186+
fi
167187

168188
# Show the output of configfsf.guess
169189
chmod +x configfsf.guess

bin/cibw_before_all_windows.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ pacman -S --noconfirm \
3131
#
3232

3333
# This is slow with MinGW:
34-
bin/build_dependencies_unix.sh --use-gmp-github-mirror
34+
bin/build_dependencies_unix.sh \
35+
--use-gmp-github-mirror\
36+
--patch-C23\
37+
#

bin/patch-C23.diff

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# HG changeset patch
2+
# User Marc Glisse <[email protected]>
3+
# Date 1738186682 -3600
4+
# Node ID 8e7bb4ae7a18b1405ea7f9cbcda450b7d920a901
5+
# Parent e84c5c785bbe8ed8c3620194e50b65adfc2f5d83
6+
Complete function prototype in acinclude.m4 for C23 compatibility
7+
8+
diff -r e84c5c785bbe -r 8e7bb4ae7a18 acinclude.m4
9+
--- a/acinclude.m4 Wed Dec 04 18:26:27 2024 +0100
10+
+++ b/acinclude.m4 Wed Jan 29 22:38:02 2025 +0100
11+
@@ -609,7 +609,7 @@
12+
13+
#if defined (__GNUC__) && ! defined (__cplusplus)
14+
typedef unsigned long long t1;typedef t1*t2;
15+
-void g(){}
16+
+void g(int,t1 const*,t1,t2,t1 const*,int){}
17+
void h(){}
18+
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
19+
{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;}
20+
21+

src/flint/types/arb.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ cdef class arb(flint_scalar):
172172
[0.333333333333333 +/- 3.71e-16]
173173
>>> print(arb("3.0"))
174174
3.00000000000000
175-
>>> print(arb("0.1")) # doctest: +SKIP
175+
>>> print(arb("0.1")) # doctest: +SKIP
176176
[0.100000000000000 +/- 2.23e-17]
177177
>>> print(arb("1/10")) # doctest: +SKIP
178178
[0.100000000000000 +/- 2.23e-17]

0 commit comments

Comments
 (0)