This is the mail archive of the
mailing list for the GCC project.
[PATCH]: Warn that mpfr-2.2.0 is buggy when configuring
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Dec 2006 20:40:31 -0500 (EST)
- Subject: [PATCH]: Warn that mpfr-2.2.0 is buggy when configuring
I had previously proposed upgrading out mpfr required version here:
After some discussion in that thread and others, it seems like the
consensus is against this for now.
Instead we'll warn the user there may be bugs and let them proceed:
I've added a testsuite case to catch it at the end, over here:
However this patch additionally updates configure to let the user know as
early as possible.
Tested on sparc-sun-solaris2.10 via configure --with-mpfr=X, where "X"
contains an old mpfr included with gmp-4.1.4, mpfr-2.2.0, mpfr-2.2.0 +
cumulative patch and finally mpfr-2.2.1.
In the first case it hard errors. In the second and third, it says buggy
version, but continues. In the last case, it passes. (All as expected.)
Okay for mainline?
2006-12-17 Kaveh R. Ghazi <firstname.lastname@example.org>
* configure.in: Warn that MPFR 2.2.0 is buggy.
* configure: Regenerate.
diff -rup orig/egcc-SVN20061216/configure.in egcc-SVN20061216/configure.in
--- orig/egcc-SVN20061216/configure.in 2006-12-11 20:01:58.000000000 -0500
+++ egcc-SVN20061216/configure.in 2006-12-17 20:21:02.651322044 -0500
@@ -1117,14 +1117,22 @@ choke me
if test x"$have_gmp" = xyes; then
+ dnl MPFR 2.2.0 is acceptable but buggy, MPFR 2.2.1 is better.
AC_MSG_CHECKING([for correct version of mpfr.h])
-#if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2)
+#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
mpfr_t n; mpfr_init(n);
-], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+], [AC_TRY_LINK([#include <gmp.h>
+#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
+ choke me
+ mpfr_t n; mpfr_init(n);
+], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy version])])],
+ [AC_MSG_RESULT([no]); have_gmp=no])