WIN64: missing GMP support for builds using MSVC

sav_ix at sav_ix at
Thu Feb 1 04:51:26 UTC 2018

Hello everyone,

Drawing your attention, that:
  - recent Autotools versions provide support for builds using MSVC,
  - MSYS2 ( provide environment for such builds,
  - recent MSVC ( available for free for Open Source development,
  - Yasm ( able to build '.gas' files on Windows.

The above allows to build GMP and MPFR using MSVC (and thus Windows ICC) in the same way and with the same set of '.gas' files, as using mingw-w64 on Windows or GCC on "native" GMP platforms. The output are full-featured binaries with <Shared|Static> layout, which passes all 'make check' tasks. Screenshot with benchmark results added in attachment.

Surely, there are enough issues with such builds using vanilla GMP sources. A part of them relate to MSVC (already reported and expected to be fixed), others to GMP build system and sources (most fixes could be committed to trunk without breaking builds on other platforms, the rest would require workarounds or rethinking design decisions).

As a side effect of builds using MSVC could be considered a wider testing of GMP sources. It already revealed few GMP bugs:
(although mingw-w64 was enough for this) and presumably would help in such way in future.

If GMP Community would be interested to provide support for builds using MSVC, the starting point may be PR:
It's unrelated to MSVC, but allows to use Yasm or mingw-w64 to process '.gas' files for builds using MSVC. There were no regressions with it on Windows. But it wasn't tested on none-Windows platforms, on which its discussion was stopped:



-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpfrbench_on_windows.png
Type: image/png
Size: 78304 bytes
Desc: not available
URL: <>

More information about the gmp-discuss mailing list