summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL20
-rw-r--r--NEWS1
-rw-r--r--configure.ac4
3 files changed, 15 insertions, 10 deletions
diff --git a/INSTALL b/INSTALL
index e092ba880..8c78c3034 100644
--- a/INSTALL
+++ b/INSTALL
@@ -238,13 +238,19 @@ specific architecture.
[1] http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/10111
-Note: By default, the configure script tries to set CC/CFLAGS to GMP's
-ones (this feature needs GMP 4.3.0 or later, or the --with-gmp-build
-option). However this is not guaranteed to work as the configure script
-does some compiler tests earlier, and the change may be too late. Also,
-the values obtained from GMP may be incorrect if GMP has been built
-on a different machine. In such a case, the user may need to specify
-CC/CFLAGS as explained below.
+Note: By default, the configure script tries to set CC / CFLAGS to GMP's
+ones from gmp.h (__GMP_CC / __GMP_CFLAGS) in order to ensure that MPFR is
+built with the same ABI as GMP. The reason is that when GMP is built, it
+may set CC / CFLAGS to select an ABI that is not the default one in order
+to have a better performance. The -pedantic option in GMP's CFLAGS, when
+present (which is the case by default), is removed, because the MPFR
+build system uses some C extensions (when this script detects that they
+are supported) and -pedantic yields too many useless warnings. However,
+this setting from GMP is not guaranteed to work as the configure script
+does some compiler tests earlier, and a conflict may arise. Also, the
+values obtained from GMP may be incorrect for the MPFR build if GMP has
+been built on a different machine; in such a case, the user may need to
+specify CC / CFLAGS, as explained below.
Moreover, even without --with-gmp-build and --enable-gmp-internals,
MPFR might use some GMP internals by mistake. This would be a bug,
diff --git a/NEWS b/NEWS
index e4f334270..4be59dd27 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,7 @@ Changes from version 4.0.1 to version 4.0.2:
Changes from version 4.0.0 to version 4.0.1:
- Improved MPFR manual.
- Improved __GMP_CC and __GMP_CFLAGS retrieval (in particular for MS Windows).
+- Option -pedantic is now always removed from __GMP_CFLAGS (see INSTALL).
- Fixed a build failure on some platforms when --with-gmp-build is used.
- Bug fixes (see ChangeLog file), in particular in mpfr_div_ui, which
could yield an incorrectly rounded result to nearest when using
diff --git a/configure.ac b/configure.ac
index c535513bf..f4f682157 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,11 +270,9 @@ if test -z "$GMP_CC$GMP_CFLAGS" ; then
# Get CFLAGS
echo "#include \"gmp.h\"" > conftest.c
echo "MPFR_OPTION __GMP_CFLAGS" >> conftest.c
- unset rmpedantic
- [test "$enable_logging" = yes && rmpedantic='s/[ "]-pedantic[ "]/ /g;']
$cpp $CPPFLAGS conftest.c 2> /dev/null > conftest.txt
test $? -ne 0 && continue
- GMP_CFLAGS=`$EGREP MPFR_OPTION conftest.txt | $SED -e "$rmpedantic"'s/MPFR_OPTION //g;s/ *" *//g'`
+ [GMP_CFLAGS=`$EGREP MPFR_OPTION conftest.txt | $SED -e 's/[ "]-pedantic[ "]/ /g;s/MPFR_OPTION //g;s/ *" *//g'`]
break
done
rm -f conftest*