Skip to content

Conversation

@emlowe
Copy link
Contributor

@emlowe emlowe commented Oct 1, 2025

The enable-fat option for GMP results in binaries in linux that do not work correctly on pre-Haswell CPUs that do not have the BMI2 instruction set.

see original report here:
https://gmplib.org/list-archives/gmp-bugs/2021-January/004991.html
and newer (same bug) on 6.3.0 here:
https://gmplib.org/list-archives/gmp-bugs/2025-February/005562.html

This PR applies the same patch as the 6.2.1 files (src/lib/gmp-patch-6.2.1/compat.c and src/lib/gmp-patch-6.2.1/longlong.h - although it does so as a true patch file created with diff -u from the original 6.2.1 checked in files. The patch does apply cleanly in 6.3.0

The patch for mpz/inp_raw.c is no longer needed as the 6.3.0 source include the exact same fixed code

The wheel python tests were tested successfully on a Core 2 Duo P8600 that does not have the BMI2 instruction set.

@emlowe emlowe changed the title add patch files for GMP6.3.0 and adjust build steps [CHIA-3769] - add patch files for GMP6.3.0 and adjust build steps Oct 1, 2025
@emlowe emlowe requested review from altendky and wjblanke October 1, 2025 22:26
@emlowe emlowe marked this pull request as ready for review October 1, 2025 22:28
@emlowe emlowe changed the title [CHIA-3769] - add patch files for GMP6.3.0 and adjust build steps [CHIA-3769] - Update GMP to 6.3.0 and include new patch files Nov 5, 2025
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants