Fix GMP v4 compatibility.
We had started relying on GMP 5.x (for usage of mpz_powm_sec), but this is pretty painful on RHEL-esque targets, which still use GMP 4.x. In the mean time while we're still supporting this, it's easier to just fallback to mpz_powm when _sec is unavailable, and emit a WARNING for using the primitive. This also installs a header, HsIntegerGmp.h, which clients could use for a fallback. As a side note, this will probably also help Debian oldstable users who might have outdated GMP versions (which I believe is the cause for #8666.) Reviewed-by:Herbert Valerio Riedel <hvr@gnu.org> Signed-off-by:
Austin Seipp <austin@well-typed.com> (cherry picked from commit d7bff4dd)
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- GHC/Integer/Type.lhs 10 additions, 0 deletionsGHC/Integer/Type.lhs
- aclocal.m4 7 additions, 2 deletionsaclocal.m4
- cbits/gmp-wrappers.cmm 8 additions, 0 deletionscbits/gmp-wrappers.cmm
- configure.ac 3 additions, 1 deletionconfigure.ac
- include/HsIntegerGmp.h.in 6 additions, 0 deletionsinclude/HsIntegerGmp.h.in
- integer-gmp.buildinfo.in 1 addition, 0 deletionsinteger-gmp.buildinfo.in
- integer-gmp.cabal 3 additions, 0 deletionsinteger-gmp.cabal
Loading
Please register or sign in to comment