This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: improved mpfr configure test
- From: Matt Fago <fago at earthlink dot net>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dj at redhat dot com, ghazi at caip dot rutgers dot edu, mark at codesourcery dot com
- Date: Wed, 27 Dec 2006 13:17:19 -0700 (GMT-07:00)
- Subject: [PATCH]: improved mpfr configure test
- Reply-to: Matt Fago <fago at earthlink dot net>
This patch aims to make the configure test for mpfr more robust. It tries to link to several
mpfr functions used by gcc that are only available in mpfr 2.2.0 or newer. Although the
prior configure tests check that the mpfr header is an appropriate version, it did not check
the library itself. On my x86_64 box the prior configure resulted in a successful configure, but
a failure during bootstrap.
See, e.g.,
http://gcc.gnu.org/ml/gcc/2006-11/msg00640.html
http://gcc.gnu.org/ml/gcc/2006-11/msg00933.html
I have no svn write access or copyright assignment on file, but this falls under the "ten line rule."
Bootstrapped on x86_64 with no new regressions.
OK for mainline?
Thanks for your help Kaveh!
-- Matt
2006-12-27 Matt Fago <fago@earthlink.net>
* configure.in: Try to link to functions only in mpfr 2.2.x
to improve robustness of configure tests.
* configure: Regenerate.
Index: configure.in
===================================================================
--- configure.in (revision 120116)
+++ configure.in (working copy)
@@ -1124,6 +1124,11 @@
choke me
#endif
mpfr_t n; mpfr_init(n);
+ mpfr_t x; mpfr_init(x);
+ int t;
+ mpfr_atan2 (n, n, x, GMP_RNDN);
+ mpfr_erfc (n, x, GMP_RNDN);
+ mpfr_subnormalize (x, t, GMP_RNDN);
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
LIBS="$saved_LIBS"
fi