[PATCH] Require GMP 4.2 and MPFR 2.2

Steve Kargl sgk@troutmask.apl.washington.edu
Sat Apr 29 19:37:00 GMT 2006


On Sat, Apr 29, 2006 at 02:10:14PM -0400, Jack Howarth wrote:
>    What exactly is the final word on this thread? Reading through it
> it seems folks are talking past each other. While the GCC maintainers
> don't even want a dependency on gmp, we are now adding a second one
> on mpfr. I don't have a particular opinion on this but rather can't
> figure out what the final decision was. Thanks in advance for any
> clarifications.


There has been no decision because I needed to update
gcc/doc/install.texi.  You'll also notice that you can
use gmp 4.1 or newer, so the broken behavior of darwin
with gmp 4.2 shouldn't be a problem.

Note my copyright assignment covers all of gcc, and I'm
listed as a Fortran maintainer.  I, however, believe that
I do not have "write after approval" for this change.
Someone else will need to do the commit.

2006-04-29  Steven G. Kargl  <kargls@comcast.net>

	* configure.in: Require MPFR 2.2 or newer for gfortran.  Raise
	the require on GMP to 4.1
	* configure: Regenerated.
	* gcc/doc/install.texi: Document the new requirements.

-- 
Steve
-------------- next part --------------
Index: configure.in
===================================================================
--- configure.in	(revision 113374)
+++ configure.in	(working copy)
@@ -1127,14 +1127,19 @@ CFLAGS="$CFLAGS $gmpinc"
 # Check GMP actually works
 AC_MSG_CHECKING([for correct version of gmp.h])
 AC_TRY_COMPILE([#include "gmp.h"],[
-#if __GNU_MP_VERSION < 3
+#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
 choke me
 #endif
-], [AC_MSG_RESULT([yes])],
-  [AC_MSG_RESULT([no]); have_gmp=no])
+], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
 
 if test x"$have_gmp" = xyes; then
-  AC_MSG_CHECKING([for MPFR])
+  AC_MSG_CHECKING([for correct version of mpfr.h])
+  AC_TRY_COMPILE([#include "gmp.h"
+#include <mpfr.h>],[
+#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
+  choke me
+#endif
+], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
 
   saved_LIBS="$LIBS"
   LIBS="$LIBS $gmplibs"
@@ -1266,7 +1271,7 @@ if test -d ${srcdir}/gcc; then
         case ,${enable_languages},:${have_gmp}:${need_gmp} in
           *,${language},*:no:yes)
             # Specifically requested language; tell them.
-            AC_MSG_ERROR([GMP with MPFR support is required to build $language])
+            AC_MSG_ERROR([GMP 4.1 and MPFR 2.2 or newer versions required by $language])
             ;;
           *:no:yes)
             # Silently disable.
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 113374)
+++ gcc/doc/install.texi	(working copy)
@@ -290,17 +290,18 @@ Necessary (only on some platforms) to un
 systems' @command{tar} programs will also work, only try GNU
 @command{tar} if you have problems.
 
-@item GNU Multiple Precision Library (GMP) version 4.0 (or later)
+@item GNU Multiple Precision Library (GMP) version 4.1 (or later)
 
-Necessary to build the Fortran frontend.  If you don't have it
+Necessary to build the Fortran frontend.  If you do not have it
 installed in your library search path, you will have to configure with
 the @option{--with-gmp} or @option{--with-gmp-dir} configure option.
 
-@item MPFR Library
+@item MPFR Library version 2.2 (or later)
 
 Necessary to build the Fortran frontend.  It can be downloaded from
-@uref{http://www.mpfr.org/}.  It is also included in the current GMP
-release (4.1.3) when configured with @option{--enable-mpfr}.
+@uref{http://www.mpfr.org/}.  The version of MPFR that is bundled with
+GMP 4.1.x contains numerous bugs, and gfortran will no longer use
+the bundled MPFR.
 
 The @option{--with-mpfr} or @option{--with-mpfr-dir} configure option should
 be used if your MPFR Library is not installed in your library search path.


More information about the Fortran mailing list