This change worked to build test and run a version of GMP-6.2.0 for my PC.
The PC is running Msys2 under Windows 10 and without change GMP failed to build.

The following change and:
    autoconf
    ./configure
    make
    make check
    make install
built a working static version of GMP for my x86_64 Skylake PC.
With very limited understanding of the Gnu-tools I was unable to make a shared (.dll) version although Msys2 provides a generic one.

$ diff -u old/configure.ac gmp-6.2.0/configure.ac
--- old/configure.ac    2020-05-30 11:42:19.002324200 -0500
+++ gmp-6.2.0/configure.ac      2020-05-30 11:43:57.507601600 -0500
@@ -2011,7 +2011,7 @@
            # Sun cc.
            cc_64_cflags="-xO3 -m64"
            ;;
-         *-*-mingw* | *-*-cygwin)
+         *-*-mingw* | *-*-cygwin | *-*-msys )
            limb_64=longlong
            CALLING_CONVENTIONS_OBJS_64=""
            AC_DEFINE(HOST_DOS64,1,[Define to 1 for Windos/64])
@@ -2037,7 +2037,7 @@
 # x86s, but allow any CPU here so as to catch "none" too.
 #
 case $host in
-  *-*-mingw*)
+  *-*-mingw* | *-*-msys )
     gcc_cflags_optlist="$gcc_cflags_optlist nocygwin"
     gcc_cflags_nocygwin="-mno-cygwin"
     ;;
@@ -2664,7 +2664,7 @@

 AC_SUBST(LIBGMP_DLL,0)
 case $host in
-  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+  *-*-cygwin* | *-*-mingw* | *-*-msys* | *-*-pw32* | *-*-os2*)
     # By default, build only static.
     if test -z "$enable_shared"; then
       enable_shared=no
@@ -3795,7 +3795,7 @@
          case $host in
            *-*-darwin*)
              GMP_INCLUDE_MPN(x86_64/darwin.m4) ;;
-           *-*-mingw* | *-*-cygwin)
+           *-*-mingw* | *-*-cygwin | *-*-msys )
              GMP_INCLUDE_MPN(x86_64/dos64.m4) ;;
            *-openbsd*)
              GMP_DEFINE_RAW(["define(<OPENBSD>,1)"]) ;;

Thanks for the great GMP support.
Regards,
Ralph Peterson

_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to