Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/buildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
python-version: '3.13'

- uses: msys2/setup-msys2@v2.27.0
- uses: msys2/setup-msys2@v2.28.0
with:
msystem: mingw64
# path-type inherit is used so that when cibuildwheel calls msys2 to
Expand Down
20 changes: 20 additions & 0 deletions bin/build_dependencies_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ do
echo " --gmp gmp - build based on GMP (default)"
echo " --gmp mpir - build based on MPIR (no longer works)"
echo " --patch-gmp-arm64 - apply patch to GMP 6.2.1 for OSX arm64"
echo " --patch-C23 - apply patch to GMP 6.3.0 for C23 compatibility"
echo " --arb - build Arb (only needed for flint < 3.0.0)"
echo
exit
Expand Down Expand Up @@ -88,6 +89,11 @@ do
PATCH_GMP_ARM64=yes
shift
;;
--patch-C23)
# Patch GMP 6.3.0 for newer gcc versions
PATCH_GMP_C23=yes
shift
;;
--use-gmp-github-mirror)
USE_GMP_GITHUB_MIRROR=yes
shift
Expand Down Expand Up @@ -164,6 +170,20 @@ if [ $USE_GMP = "gmp" ]; then
echo --------------------------------------------
patch -N -Z -p0 < ../../../bin/patch-arm64.diff
fi
#
# https://github.com/msys2/MSYS2-packages/issues/5499
#
# This patch needed for GMP 6.3.0 building with msys2 or probably just
# newer gcc versions.
#
if [ $PATCH_GMP_C23 = "yes" ]; then
echo
echo --------------------------------------------
echo " patching GMP"
echo --------------------------------------------
patch -N -Z < ../../../bin/patch-C23.diff
autoreconf -fi
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this?


# Show the output of configfsf.guess
chmod +x configfsf.guess
Expand Down
5 changes: 4 additions & 1 deletion bin/cibw_before_all_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ pacman -S --noconfirm \
#

# This is slow with MinGW:
bin/build_dependencies_unix.sh --use-gmp-github-mirror
bin/build_dependencies_unix.sh \
--use-gmp-github-mirror\
--patch-C23\
#
21 changes: 21 additions & 0 deletions bin/patch-C23.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# HG changeset patch
# User Marc Glisse <marc.glisse@inria.fr>
# Date 1738186682 -3600
# Node ID 8e7bb4ae7a18b1405ea7f9cbcda450b7d920a901
# Parent e84c5c785bbe8ed8c3620194e50b65adfc2f5d83
Complete function prototype in acinclude.m4 for C23 compatibility

diff -r e84c5c785bbe -r 8e7bb4ae7a18 acinclude.m4
--- a/acinclude.m4 Wed Dec 04 18:26:27 2024 +0100
+++ b/acinclude.m4 Wed Jan 29 22:38:02 2025 +0100
@@ -609,7 +609,7 @@

#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 changes: 1 addition & 1 deletion src/flint/types/arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ cdef class arb(flint_scalar):
[0.333333333333333 +/- 3.71e-16]
>>> print(arb("3.0"))
3.00000000000000
>>> print(arb("0.1")) # doctest: +SKIP
>>> print(arb("0.1")) # doctest: +SKIP
[0.100000000000000 +/- 2.23e-17]
>>> print(arb("1/10")) # doctest: +SKIP
[0.100000000000000 +/- 2.23e-17]
Expand Down
Loading