winlibs / winlib-builder

MIT License
6 stars 5 forks source link

Add builder for BrianGladman/mpir #22

Open cmb69 opened 2 days ago

cmb69 commented 2 days ago

Frankly, I'm not sure what to do about mpir, which is a fork of libgmp, used to build ext/gmp on Windows. The latest release (3.0.0) was published more than seven years ago, and the project seems to be abandoned. There is https://github.com/BrianGladman/mpir, a fork that focuses on Windows, which had some activity, but according to https://github.com/wbhart/mpir/issues/272, neither the original work, nor Brian Gladman's fork are still maintained.

If no further maintenance will happen, we may consider to switch to libgmp, although there is no support for native Windows builds (only autoconf), which is likely one of the reasons why we had chosen mpir; the other is that mpir provides optimized implementations (in Assembler, using SIMD instructions), although I don't think that any of these have been used for our official builds. Those that are offered out of the box by BrianGladman/mpir use AVX and maybe AVX2 instructions, and that would not fit with our PHP builds which are constrained to SSE2. If we switch to libgmp, we may even consider using mini-gmp which is a minimal variant consisting of a few C files only, but claims to be slow since it's lacking optimizations. It might not be that bad, considering that we didn't deploy the optimizations of mpir.

Anyhow, to make some progress, this PR add a builder for BrianGladman/mpir (which has at least one relevant bug fix). A test build showed no issues running the ext/gmp test suite on master/x64. Since that repo never released tags, and the version numbers have never been bumped, I have no idea what to do about that. Of course, we could modify the version numbers, or just call it mpir-3.0.0-1 or something.