public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC] Update gmp/mpfr/mpc minimum versions
@ 2016-04-26 18:23 Bernd Edlinger
  2016-04-26 18:29 ` Jakub Jelinek
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-26 18:23 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Biener, Marc Glisse

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

Hi,

as we all know, it's high time now to adjust the minimum supported
gmp/mpfr/mpc versions for gcc-7.

So this attached patch is now targeting at only supporting the currently
latest relased gmp-6.1.0, mpfr-3.1.4 and mpc-1.0.3, instead of trying
to support all previous versions, especially in-tree, but also without the
in-tree configuration the previously used versions are really creating
trouble nowadays.

To support gmp-6.1.0 in-tree we have to set AM_CFLAGS=-DNO_ASM
as already done with mpfr.  This was already discussed recently on this list.

Initially I was trying to use gmp's new --disable-assembly, but
after careful consideration, I think that we still need to set gmp's
target to none-host-vendor triplet, because only that prevents
gmp to get smart on selecting one of the different possible
target-ABIs.  This would not really work in general, because
gcc overrides the CFLAGS an thus defeats the ABI selection
again.

What do you think, is this patch generally acceptable?

Of course it would mean that everybody would have to use
the recent gmp/mpfr/mpc tar balls immediately, and someone would
have to upload them to ftp://gcc.gnu.org/pub/gcc/infrastructure/
before this patch can be applied of course (I don't know how to).


Thanks
Bernd.

[-- Attachment #2: changelog-gmp-update.txt --]
[-- Type: text/plain, Size: 512 bytes --]

2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* configure.ac (mpfr): Remove pre-3.1.0 compatibility.
	* configure: Regenerated.
	* Makefile.def (gmp): Explicitly disable assembler.
	(mpfr): Adjust lib_path.
	(mpc): Likewise.
	* Makefile.in: Regenerated.

gcc/
2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* doc/install.texi: Adjust gmp/mpfr/mpc minimum versions.

contrib/
2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* download_prerequisites: Adjust gmp/mpfr/mpc versions.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch-gmp-update.diff --]
[-- Type: text/x-patch; name="patch-gmp-update.diff", Size: 16214 bytes --]

Index: Makefile.def
===================================================================
--- Makefile.def	(revision 234533)
+++ Makefile.def	(working copy)
@@ -50,6 +50,7 @@ host_modules= { module= gcc; bootstrap=true;
 host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
 		// Work around in-tree gmp configure bug with missing flex.
 		extra_configure_flags='--disable-shared LEX="touch lex.yy.c"';
+		extra_make_flags='AM_CFLAGS="-DNO_ASM"';
 		no_install= true;
 		// none-*-* disables asm optimizations, bootstrap-testing
 		// the compiler more thoroughly.
@@ -57,11 +58,11 @@ host_modules= { module= gmp; lib_path=.libs; boots
 		// gmp's configure will complain if given anything
 		// different from host for target.
 	        target="none-${host_vendor}-${host_os}"; };
-host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
+host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
 		extra_make_flags='AM_CFLAGS="-DNO_ASM"';
 		no_install= true; };
-host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
+host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
 		no_install= true; };
 host_modules= { module= isl; lib_path=.libs; bootstrap=true;
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 234533)
+++ Makefile.in	(working copy)
@@ -639,12 +639,12 @@ HOST_LIB_PATH_gmp = \
 
 @if mpfr
 HOST_LIB_PATH_mpfr = \
-  $$r/$(HOST_SUBDIR)/mpfr/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/.libs:
+  $$r/$(HOST_SUBDIR)/mpfr/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/src/.libs:
 @endif mpfr
 
 @if mpc
 HOST_LIB_PATH_mpc = \
-  $$r/$(HOST_SUBDIR)/mpc/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/.libs:
+  $$r/$(HOST_SUBDIR)/mpc/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/src/.libs:
 @endif mpc
 
 @if isl
@@ -11299,7 +11299,7 @@ all-gmp: configure-gmp
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/gmp && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		$(TARGET-gmp))
 @endif gmp
 
@@ -11328,7 +11328,7 @@ all-stage1-gmp: configure-stage1-gmp
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
 		$(EXTRA_HOST_FLAGS)  \
-		$(STAGE1_FLAGS_TO_PASS)  \
+		$(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE1_TFLAGS)" \
 		$(TARGET-stage1-gmp)
 
@@ -11343,7 +11343,7 @@ clean-stage1-gmp:
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
 	$(MAKE) $(EXTRA_HOST_FLAGS)  \
-	$(STAGE1_FLAGS_TO_PASS)  clean
+	$(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11370,7 +11370,7 @@ all-stage2-gmp: configure-stage2-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE2_TFLAGS)" \
 		$(TARGET-stage2-gmp)
 
@@ -11384,7 +11384,7 @@ clean-stage2-gmp:
 	  $(MAKE) stage2-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11411,7 +11411,7 @@ all-stage3-gmp: configure-stage3-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE3_TFLAGS)" \
 		$(TARGET-stage3-gmp)
 
@@ -11425,7 +11425,7 @@ clean-stage3-gmp:
 	  $(MAKE) stage3-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11452,7 +11452,7 @@ all-stage4-gmp: configure-stage4-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE4_TFLAGS)" \
 		$(TARGET-stage4-gmp)
 
@@ -11466,7 +11466,7 @@ clean-stage4-gmp:
 	  $(MAKE) stage4-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11493,7 +11493,7 @@ all-stageprofile-gmp: configure-stageprofile-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGEprofile_TFLAGS)" \
 		$(TARGET-stageprofile-gmp)
 
@@ -11507,7 +11507,7 @@ clean-stageprofile-gmp:
 	  $(MAKE) stageprofile-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11534,7 +11534,7 @@ all-stagefeedback-gmp: configure-stagefeedback-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGEfeedback_TFLAGS)" \
 		$(TARGET-stagefeedback-gmp)
 
@@ -11548,7 +11548,7 @@ clean-stagefeedback-gmp:
 	  $(MAKE) stagefeedback-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11566,7 +11566,7 @@ check-gmp:
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/gmp && \
-	  $(MAKE) $(FLAGS_TO_PASS)  $(EXTRA_BOOTSTRAP_FLAGS) check)
+	  $(MAKE) $(FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" $(EXTRA_BOOTSTRAP_FLAGS) check)
 
 @endif gmp
 
@@ -11601,7 +11601,7 @@ info-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in gmp"; \
@@ -11626,7 +11626,7 @@ dvi-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in gmp"; \
@@ -11651,7 +11651,7 @@ pdf-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in gmp"; \
@@ -11676,7 +11676,7 @@ html-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in gmp"; \
@@ -11701,7 +11701,7 @@ TAGS-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in gmp"; \
@@ -11727,7 +11727,7 @@ install-info-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in gmp"; \
@@ -11753,7 +11753,7 @@ install-pdf-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in gmp"; \
@@ -11779,7 +11779,7 @@ install-html-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in gmp"; \
@@ -11804,7 +11804,7 @@ installcheck-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in gmp"; \
@@ -11828,7 +11828,7 @@ mostlyclean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in gmp"; \
@@ -11852,7 +11852,7 @@ clean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in gmp"; \
@@ -11876,7 +11876,7 @@ distclean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in gmp"; \
@@ -11900,7 +11900,7 @@ maintainer-clean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in gmp"; \
Index: configure
===================================================================
--- configure	(revision 234533)
+++ configure	(working copy)
@@ -5570,16 +5570,9 @@ if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
-  # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
Index: configure.ac
===================================================================
--- configure.ac	(revision 234533)
+++ configure.ac	(working copy)
@@ -1550,16 +1550,9 @@ if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
-  # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
Index: contrib/download_prerequisites
===================================================================
--- contrib/download_prerequisites	(revision 234533)
+++ contrib/download_prerequisites	(working copy)
@@ -30,9 +30,9 @@ if [ ! -e gcc/BASE-VER ] ; then
 fi
 
 # Necessary to build GCC.
-MPFR=mpfr-2.4.2
-GMP=gmp-4.3.2
-MPC=mpc-0.8.1
+MPFR=mpfr-3.1.4
+GMP=gmp-6.1.0
+MPC=mpc-1.0.3
 
 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1
 tar xjf $MPFR.tar.bz2 || exit 1
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 234533)
+++ gcc/doc/install.texi	(working copy)
@@ -354,7 +354,7 @@ support libraries then using those packages may be
 install the libraries.
 
 @table @asis
-@item GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
+@item GNU Multiple Precision Library (GMP) version 6.1.0 (or later)
 
 Necessary to build GCC@.  If a GMP source distribution is found in a
 subdirectory of your GCC sources named @file{gmp}, it will be built
@@ -363,7 +363,7 @@ is not in your library search path, you will have
 @option{--with-gmp} configure option.  See also @option{--with-gmp-lib}
 and @option{--with-gmp-include}.
 
-@item MPFR Library version 2.4.2 (or later)
+@item MPFR Library version 3.1.4 (or later)
 
 Necessary to build GCC@.  It can be downloaded from
 @uref{http://www.mpfr.org/}.  If an MPFR source distribution is found
@@ -373,7 +373,7 @@ but it is not in your default library search path,
 @option{--with-mpfr} configure option should be used.  See also
 @option{--with-mpfr-lib} and @option{--with-mpfr-include}.
 
-@item MPC Library version 0.8.1 (or later)
+@item MPC Library version 1.0.3 (or later)
 
 Necessary to build GCC@.  It can be downloaded from
 @uref{http://www.multiprecision.org/}.  If an MPC source distribution

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 18:23 [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
@ 2016-04-26 18:29 ` Jakub Jelinek
  2016-04-26 18:42   ` Bernd Edlinger
  2016-04-26 18:39 ` Marc Glisse
  2016-04-26 20:15 ` Joseph Myers
  2 siblings, 1 reply; 29+ messages in thread
From: Jakub Jelinek @ 2016-04-26 18:29 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: gcc-patches, Richard Biener, Marc Glisse

On Tue, Apr 26, 2016 at 06:23:17PM +0000, Bernd Edlinger wrote:
> as we all know, it's high time now to adjust the minimum supported
> gmp/mpfr/mpc versions for gcc-7.

I'm not saying we shouldn't bump the minimum supported versions, but bumping
them immediately to the latest releases is IMHO undesirable unless the
benefits can justify it.
E.g. I don't consider gmp-6.0.0, or mpfr-3.1.2, or mpc-1.0.2 that obsolete
that I'd have to download a newer one for my daily use.

	Jakub

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 18:23 [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
  2016-04-26 18:29 ` Jakub Jelinek
@ 2016-04-26 18:39 ` Marc Glisse
  2016-04-26 19:01   ` Richard Biener
  2016-04-26 19:05   ` Bernd Edlinger
  2016-04-26 20:15 ` Joseph Myers
  2 siblings, 2 replies; 29+ messages in thread
From: Marc Glisse @ 2016-04-26 18:39 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: gcc-patches, Richard Biener

On Tue, 26 Apr 2016, Bernd Edlinger wrote:

> as we all know, it's high time now to adjust the minimum supported
> gmp/mpfr/mpc versions for gcc-7.
>
> So this attached patch is now targeting at only supporting the currently
> latest relased gmp-6.1.0, mpfr-3.1.4 and mpc-1.0.3, instead of trying
> to support all previous versions, especially in-tree, but also without the
> in-tree configuration the previously used versions are really creating
> trouble nowadays.

For in-tree builds, requiring the latest version makes sense to me. When 
building gcc with a pre-installed gmp/mpfr/mpc (say the one provided by 
your linux distribution), that's much more painful, and the benefit is not 
as clear. What "trouble" do you have in mind?

> To support gmp-6.1.0 in-tree we have to set AM_CFLAGS=-DNO_ASM
> as already done with mpfr.  This was already discussed recently on this list.

Note that gmp-6.1.1 is supposed to be out any day now and will not require 
-DNO_ASM anymore.

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 18:29 ` Jakub Jelinek
@ 2016-04-26 18:42   ` Bernd Edlinger
  0 siblings, 0 replies; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-26 18:42 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc-patches, Richard Biener, Marc Glisse

On 26.04.2016 20:29, Jakub Jelinek wrote:
> On Tue, Apr 26, 2016 at 06:23:17PM +0000, Bernd Edlinger wrote:
>> as we all know, it's high time now to adjust the minimum supported
>> gmp/mpfr/mpc versions for gcc-7.
>
> I'm not saying we shouldn't bump the minimum supported versions, but bumping
> them immediately to the latest releases is IMHO undesirable unless the
> benefits can justify it.
> E.g. I don't consider gmp-6.0.0, or mpfr-3.1.2, or mpc-1.0.2 that obsolete
> that I'd have to download a newer one for my daily use.
>
> 	Jakub
>

Yes, thanks.

That would be acceptable as well.  I think the patch will work
with these versions too.

I'd even use these versions for download_prerequisites if they
are more widespread in use today.


Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 18:39 ` Marc Glisse
@ 2016-04-26 19:01   ` Richard Biener
  2016-04-26 19:05   ` Bernd Edlinger
  1 sibling, 0 replies; 29+ messages in thread
From: Richard Biener @ 2016-04-26 19:01 UTC (permalink / raw)
  To: Marc Glisse, Bernd Edlinger; +Cc: gcc-patches

On April 26, 2016 8:39:28 PM GMT+02:00, Marc Glisse <marc.glisse@inria.fr> wrote:
>On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>
>> as we all know, it's high time now to adjust the minimum supported
>> gmp/mpfr/mpc versions for gcc-7.
>>
>> So this attached patch is now targeting at only supporting the
>currently
>> latest relased gmp-6.1.0, mpfr-3.1.4 and mpc-1.0.3, instead of trying
>> to support all previous versions, especially in-tree, but also
>without the
>> in-tree configuration the previously used versions are really
>creating
>> trouble nowadays.
>
>For in-tree builds, requiring the latest version makes sense to me.
>When 
>building gcc with a pre-installed gmp/mpfr/mpc (say the one provided by
>
>your linux distribution), that's much more painful, and the benefit is
>not 
>as clear. What "trouble" do you have in mind?
>
>> To support gmp-6.1.0 in-tree we have to set AM_CFLAGS=-DNO_ASM
>> as already done with mpfr.  This was already discussed recently on
>this list.
>
>Note that gmp-6.1.1 is supposed to be out any day now and will not
>require 
>-DNO_ASM anymore.

I agree with Marc here - we should only update the version used by download prerequisites and document that this is the only supported version for in-tree builds.

Richard.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 18:39 ` Marc Glisse
  2016-04-26 19:01   ` Richard Biener
@ 2016-04-26 19:05   ` Bernd Edlinger
  2016-04-26 19:29     ` Marc Glisse
  1 sibling, 1 reply; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-26 19:05 UTC (permalink / raw)
  To: Marc Glisse; +Cc: gcc-patches, Richard Biener

On 26.04.2016 20:39, Marc Glisse wrote:
> On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>
>> as we all know, it's high time now to adjust the minimum supported
>> gmp/mpfr/mpc versions for gcc-7.
>>
>> So this attached patch is now targeting at only supporting the currently
>> latest relased gmp-6.1.0, mpfr-3.1.4 and mpc-1.0.3, instead of trying
>> to support all previous versions, especially in-tree, but also without
>> the
>> in-tree configuration the previously used versions are really creating
>> trouble nowadays.
>
> For in-tree builds, requiring the latest version makes sense to me. When
> building gcc with a pre-installed gmp/mpfr/mpc (say the one provided by
> your linux distribution), that's much more painful, and the benefit is
> not as clear. What "trouble" do you have in mind?
>

For instance PR libstdc++/69881: gmp.h did this:

#define __need_size_t  /* tell gcc stddef.h we only want size_t */
#include <cstddef>     /* for size_t */

I've persuaded Jonathan to work around that in libstdc++.

Of course the in-tree build does work with less versions than
otherwise.

>> To support gmp-6.1.0 in-tree we have to set AM_CFLAGS=-DNO_ASM
>> as already done with mpfr.  This was already discussed recently on
>> this list.
>
> Note that gmp-6.1.1 is supposed to be out any day now and will not
> require -DNO_ASM anymore.
>

Yes, I know.  I mean, I have tested the patch already with the gmp 
snapshots, but was not aware that it will be available so soon.
However I think it would not really hurt to allow a little
more interoperability, even for in-tree builds.

It is just a matter what versions we want to test, I have not really
any idea where the limits will be, just that it can no longer be 4.3.2.


Thanks
Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 19:05   ` Bernd Edlinger
@ 2016-04-26 19:29     ` Marc Glisse
  2016-04-27 14:01       ` Bernd Edlinger
  0 siblings, 1 reply; 29+ messages in thread
From: Marc Glisse @ 2016-04-26 19:29 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: gcc-patches, Richard Biener

On Tue, 26 Apr 2016, Bernd Edlinger wrote:

> For instance PR libstdc++/69881: gmp.h did this:
>
> #define __need_size_t  /* tell gcc stddef.h we only want size_t */
> #include <cstddef>     /* for size_t */
>
> I've persuaded Jonathan to work around that in libstdc++.
>
> Of course the in-tree build does work with less versions than
> otherwise.

IIUC, the bug only shows up if you compile in C++11 or later, so basically 
g++-6 or later, and there is a workaround in libstdc++ starting from 
version 6 that means that it doesn't cause any problem. So there might be 
a problem if someone tries to build gcc using CXX='g++-5 -std=c++11' or 
CXX='clang++ -stdlib=libc++' on a glibc system (I don't think others use 
__need_size_t?), but those are rather odd cases.

>>> To support gmp-6.1.0 in-tree we have to set AM_CFLAGS=-DNO_ASM
>>> as already done with mpfr.  This was already discussed recently on
>>> this list.
>>
>> Note that gmp-6.1.1 is supposed to be out any day now and will not
>> require -DNO_ASM anymore.
>>
>
> Yes, I know.  I mean, I have tested the patch already with the gmp
> snapshots, but was not aware that it will be available so soon.
> However I think it would not really hurt to allow a little
> more interoperability, even for in-tree builds.
>
> It is just a matter what versions we want to test, I have not really
> any idea where the limits will be, just that it can no longer be 4.3.2.

Even if in-tree builds work with several versions, we may still want to 
document only one as supported.

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 18:23 [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
  2016-04-26 18:29 ` Jakub Jelinek
  2016-04-26 18:39 ` Marc Glisse
@ 2016-04-26 20:15 ` Joseph Myers
  2016-04-27 15:31   ` Bernd Edlinger
  2 siblings, 1 reply; 29+ messages in thread
From: Joseph Myers @ 2016-04-26 20:15 UTC (permalink / raw)
  To: Bernd Edlinger; +Cc: gcc-patches, Richard Biener, Marc Glisse

On Tue, 26 Apr 2016, Bernd Edlinger wrote:

> Hi,
> 
> as we all know, it's high time now to adjust the minimum supported
> gmp/mpfr/mpc versions for gcc-7.

I think updating the minimum versions (when using previously built 
libraries, not in-tree) is only appropriate when it allows some cleanup in 
GCC, such as removing conditionals on whether a more recently added 
function is available, adding functionality that depends on a newer 
interface, or using newer interfaces instead of older ones that are now 
deprecated.

For example, you could justify a move to requiring MPFR 3.0.0 or later 
with cleanups to use MPFR_RND* instead of the older GMP_RND*, and 
similarly mpfr_rnd_t instead of the older mp_rnd_t and likewise mpfr_exp_t 
and mpfr_prec_t in fortran/.  You could justify a move to requiring MPC 
1.0.0 (or 1.0.2) by optimizing clog10 using mpc_log10.  I don't know what 
if any newer GMP interfaces would be beneficial in GCC.  And as always in 
such cases, it's a good idea to look at e.g. how widespread the newer 
versions are in GNU/Linux distributions, which indicates how many people 
might be affected by an increase in the version requirement.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 19:29     ` Marc Glisse
@ 2016-04-27 14:01       ` Bernd Edlinger
  0 siblings, 0 replies; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-27 14:01 UTC (permalink / raw)
  To: Marc Glisse
  Cc: gcc-patches, Richard Biener <rguenther@suse.de>; Jonathan Wakely

On 26.04.2016 21:28, Marc Glisse wrote:
> On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>
>> For instance PR libstdc++/69881: gmp.h did this:
>>
>> #define __need_size_t  /* tell gcc stddef.h we only want size_t */
>> #include <cstddef>     /* for size_t */
>>
>> I've persuaded Jonathan to work around that in libstdc++.
>>
>> Of course the in-tree build does work with less versions than
>> otherwise.
>
> IIUC, the bug only shows up if you compile in C++11 or later, so
> basically g++-6 or later, and there is a workaround in libstdc++
> starting from version 6 that means that it doesn't cause any problem. So
> there might be a problem if someone tries to build gcc using CXX='g++-5
> -std=c++11' or CXX='clang++ -stdlib=libc++' on a glibc system (I don't
> think others use __need_size_t?), but those are rather odd cases.
>

Yea, but Jonathan did not like this workaround at all, and my personal
preference would also just have been a better error message for this
clearly invalid code.


Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-26 20:15 ` Joseph Myers
@ 2016-04-27 15:31   ` Bernd Edlinger
  2016-04-27 15:37     ` Rainer Orth
  2016-04-28  7:09     ` Richard Biener
  0 siblings, 2 replies; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-27 15:31 UTC (permalink / raw)
  To: Joseph Myers
  Cc: gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

On 26.04.2016 22:14, Joseph Myers wrote:
> On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>
>> Hi,
>>
>> as we all know, it's high time now to adjust the minimum supported
>> gmp/mpfr/mpc versions for gcc-7.
>
> I think updating the minimum versions (when using previously built
> libraries, not in-tree) is only appropriate when it allows some cleanup in
> GCC, such as removing conditionals on whether a more recently added
> function is available, adding functionality that depends on a newer
> interface, or using newer interfaces instead of older ones that are now
> deprecated.
>
> For example, you could justify a move to requiring MPFR 3.0.0 or later
> with cleanups to use MPFR_RND* instead of the older GMP_RND*, and
> similarly mpfr_rnd_t instead of the older mp_rnd_t and likewise mpfr_exp_t
> and mpfr_prec_t in fortran/.  You could justify a move to requiring MPC
> 1.0.0 (or 1.0.2) by optimizing clog10 using mpc_log10.  I don't know what
> if any newer GMP interfaces would be beneficial in GCC.  And as always in
> such cases, it's a good idea to look at e.g. how widespread the newer
> versions are in GNU/Linux distributions, which indicates how many people
> might be affected by an increase in the version requirement.
>

Yes I see.

I would justify it this way: gmp-6.0.0 is the first version that does
not invoke undefined behavior in gmp.h, once we update to gmp-6.0.0
we could emit at least a warning in cstddef for this invalid code.

Once we have gmp-6.0.0, the earliest mpfr version that compiles at all
is mpfr-3.1.1 and the earliest mpc version that compiles at all is
mpc-0.9.  This would be the supported installed versions.

In-tree gmp-6.0.0 does _not_ work for ARM.  But gmp-6.1.0 does (with a
little quirk).  All supported mpfr and mpc versions are working in-tree
too, even for the ARM target.

When we have at least mpfr-3.1.1, it is straight forward to remove the
pre-3.1.0 compatibility code from gcc/fortran/simplify.c for instance.

So I would propose this updated patch for gcc-7.


Thanks
Bernd.

[-- Attachment #2: changelog-gmp-update.txt --]
[-- Type: text/plain, Size: 757 bytes --]

2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code.
	Adjust check to new minimum gmp, mpfr and mpc versions.
	* configure: Regenerated.
	* Makefile.def (gmp): Explicitly disable assembler.
	(mpfr): Adjust lib_path.
	(mpc): Likewise.
	* Makefile.in: Regenerated.

gcc/
2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* doc/install.texi: Adjust gmp/mpfr/mpc minimum versions.

gcc/fortran/
2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* simplify.c (gfc_simplify_fraction): Remove pre-3.1.0 mpfr
	compatibility code.

contrib/
2016-04-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* download_prerequisites: Adjust gmp/mpfr/mpc versions.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch-gmp-update.diff --]
[-- Type: text/x-patch; name="patch-gmp-update.diff", Size: 24255 bytes --]

Index: Makefile.def
===================================================================
--- Makefile.def	(Revision 235487)
+++ Makefile.def	(Arbeitskopie)
@@ -50,6 +50,7 @@ host_modules= { module= gcc; bootstrap=true;
 host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
 		// Work around in-tree gmp configure bug with missing flex.
 		extra_configure_flags='--disable-shared LEX="touch lex.yy.c"';
+		extra_make_flags='AM_CFLAGS="-DNO_ASM"';
 		no_install= true;
 		// none-*-* disables asm optimizations, bootstrap-testing
 		// the compiler more thoroughly.
@@ -57,11 +58,11 @@ host_modules= { module= gmp; lib_path=.libs; boots
 		// gmp's configure will complain if given anything
 		// different from host for target.
 	        target="none-${host_vendor}-${host_os}"; };
-host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
+host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
 		extra_make_flags='AM_CFLAGS="-DNO_ASM"';
 		no_install= true; };
-host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
+host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
 		no_install= true; };
 host_modules= { module= isl; lib_path=.libs; bootstrap=true;
Index: Makefile.in
===================================================================
--- Makefile.in	(Revision 235487)
+++ Makefile.in	(Arbeitskopie)
@@ -639,12 +639,12 @@ HOST_LIB_PATH_gmp = \
 
 @if mpfr
 HOST_LIB_PATH_mpfr = \
-  $$r/$(HOST_SUBDIR)/mpfr/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/.libs:
+  $$r/$(HOST_SUBDIR)/mpfr/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/src/.libs:
 @endif mpfr
 
 @if mpc
 HOST_LIB_PATH_mpc = \
-  $$r/$(HOST_SUBDIR)/mpc/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/.libs:
+  $$r/$(HOST_SUBDIR)/mpc/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/src/.libs:
 @endif mpc
 
 @if isl
@@ -11300,7 +11300,7 @@ all-gmp: configure-gmp
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/gmp && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		$(TARGET-gmp))
 @endif gmp
 
@@ -11329,7 +11329,7 @@ all-stage1-gmp: configure-stage1-gmp
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
 		$(EXTRA_HOST_FLAGS)  \
-		$(STAGE1_FLAGS_TO_PASS)  \
+		$(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE1_TFLAGS)" \
 		$(TARGET-stage1-gmp)
 
@@ -11344,7 +11344,7 @@ clean-stage1-gmp:
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
 	$(MAKE) $(EXTRA_HOST_FLAGS)  \
-	$(STAGE1_FLAGS_TO_PASS)  clean
+	$(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11371,7 +11371,7 @@ all-stage2-gmp: configure-stage2-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE2_TFLAGS)" \
 		$(TARGET-stage2-gmp)
 
@@ -11385,7 +11385,7 @@ clean-stage2-gmp:
 	  $(MAKE) stage2-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11412,7 +11412,7 @@ all-stage3-gmp: configure-stage3-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE3_TFLAGS)" \
 		$(TARGET-stage3-gmp)
 
@@ -11426,7 +11426,7 @@ clean-stage3-gmp:
 	  $(MAKE) stage3-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11453,7 +11453,7 @@ all-stage4-gmp: configure-stage4-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE4_TFLAGS)" \
 		$(TARGET-stage4-gmp)
 
@@ -11467,7 +11467,7 @@ clean-stage4-gmp:
 	  $(MAKE) stage4-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11494,7 +11494,7 @@ all-stageprofile-gmp: configure-stageprofile-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGEprofile_TFLAGS)" \
 		$(TARGET-stageprofile-gmp)
 
@@ -11508,7 +11508,7 @@ clean-stageprofile-gmp:
 	  $(MAKE) stageprofile-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11535,7 +11535,7 @@ all-stagefeedback-gmp: configure-stagefeedback-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGEfeedback_TFLAGS)" \
 		$(TARGET-stagefeedback-gmp)
 
@@ -11549,7 +11549,7 @@ clean-stagefeedback-gmp:
 	  $(MAKE) stagefeedback-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11567,7 +11567,7 @@ check-gmp:
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/gmp && \
-	  $(MAKE) $(FLAGS_TO_PASS)  $(EXTRA_BOOTSTRAP_FLAGS) check)
+	  $(MAKE) $(FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" $(EXTRA_BOOTSTRAP_FLAGS) check)
 
 @endif gmp
 
@@ -11602,7 +11602,7 @@ info-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in gmp"; \
@@ -11627,7 +11627,7 @@ dvi-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in gmp"; \
@@ -11652,7 +11652,7 @@ pdf-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in gmp"; \
@@ -11677,7 +11677,7 @@ html-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in gmp"; \
@@ -11702,7 +11702,7 @@ TAGS-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in gmp"; \
@@ -11728,7 +11728,7 @@ install-info-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in gmp"; \
@@ -11754,7 +11754,7 @@ install-pdf-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in gmp"; \
@@ -11780,7 +11780,7 @@ install-html-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in gmp"; \
@@ -11805,7 +11805,7 @@ installcheck-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in gmp"; \
@@ -11829,7 +11829,7 @@ mostlyclean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in gmp"; \
@@ -11853,7 +11853,7 @@ clean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in gmp"; \
@@ -11877,7 +11877,7 @@ distclean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in gmp"; \
@@ -11901,7 +11901,7 @@ maintainer-clean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in gmp"; \
Index: configure
===================================================================
--- configure	(Revision 235487)
+++ configure	(Arbeitskopie)
@@ -5570,16 +5570,9 @@ if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
-  # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
@@ -5649,24 +5642,6 @@ $as_echo_n "checking for the correct version of gm
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include "gmp.h"
-int
-main ()
-{
-
-  #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-  #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3)
-  choke me
-  #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 #include <gmp.h>
 int
 main ()
@@ -5674,7 +5649,7 @@ main ()
 
   #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
   #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
+  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(6,0,0)
   choke me
   #endif
 
@@ -5686,11 +5661,6 @@ if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; have_gmp=no
 fi
@@ -5709,7 +5679,7 @@ int
 main ()
 {
 
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+    #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,1)
     choke me
     #endif
 
@@ -5718,31 +5688,9 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <gmp.h>
-    #include <mpfr.h>
-int
-main ()
-{
-
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
-    choke me
-    #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; have_gmp=no
 fi
@@ -5761,7 +5709,7 @@ int
 main ()
 {
 
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
+    #if MPC_VERSION < MPC_VERSION_NUM(0,9,0)
     choke me
     #endif
 
@@ -5770,30 +5718,9 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <mpc.h>
-int
-main ()
-{
-
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
-    choke me
-    #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; have_gmp=no
 fi
Index: configure.ac
===================================================================
--- configure.ac	(Revision 235487)
+++ configure.ac	(Arbeitskopie)
@@ -1550,16 +1550,9 @@ if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
-  # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
@@ -1615,20 +1608,14 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xn
   CFLAGS="$CFLAGS $gmpinc"
   # Check for the recommended and required versions of GMP.
   AC_MSG_CHECKING([for the correct version of gmp.h])
-  AC_TRY_COMPILE([#include "gmp.h"],[
+  AC_TRY_COMPILE([#include <gmp.h>],[
   #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
   #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3)
+  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(6,0,0)
   choke me
   #endif
-  ], [AC_TRY_COMPILE([#include <gmp.h>],[
-  #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-  #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
-  choke me
-  #endif
-  ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
-   [AC_MSG_RESULT([no]); have_gmp=no])
+  ], [AC_MSG_RESULT([yes])],
+     [AC_MSG_RESULT([no]); have_gmp=no])
 
   # If we have GMP, check the MPFR version.
   if test x"$have_gmp" = xyes; then
@@ -1636,16 +1623,11 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xn
     AC_MSG_CHECKING([for the correct version of mpfr.h])
     AC_TRY_COMPILE([#include <gmp.h>
     #include <mpfr.h>],[
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+    #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,1)
     choke me
     #endif
-    ], [AC_TRY_COMPILE([#include <gmp.h>
-    #include <mpfr.h>],[
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
-    choke me
-    #endif
-    ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
-     [AC_MSG_RESULT([no]); have_gmp=no])
+    ], [AC_MSG_RESULT([yes])],
+       [AC_MSG_RESULT([no]); have_gmp=no])
   fi
 
   # Check for the MPC header version.
@@ -1653,15 +1635,11 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xn
     # Check for the recommended and required versions of MPC.
     AC_MSG_CHECKING([for the correct version of mpc.h])
     AC_TRY_COMPILE([#include <mpc.h>],[
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
+    #if MPC_VERSION < MPC_VERSION_NUM(0,9,0)
     choke me
     #endif
-    ], [AC_TRY_COMPILE([#include <mpc.h>],[
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
-    choke me
-    #endif
-    ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
-     [AC_MSG_RESULT([no]); have_gmp=no])
+    ], [AC_MSG_RESULT([yes])],
+       [AC_MSG_RESULT([no]); have_gmp=no])
   fi
 
   # Now check the MPFR library.
Index: contrib/download_prerequisites
===================================================================
--- contrib/download_prerequisites	(Revision 235487)
+++ contrib/download_prerequisites	(Arbeitskopie)
@@ -30,9 +30,9 @@ if [ ! -e gcc/BASE-VER ] ; then
 fi
 
 # Necessary to build GCC.
-MPFR=mpfr-2.4.2
-GMP=gmp-4.3.2
-MPC=mpc-0.8.1
+MPFR=mpfr-3.1.1
+GMP=gmp-6.1.0
+MPC=mpc-0.9
 
 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1
 tar xjf $MPFR.tar.bz2 || exit 1
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(Revision 235487)
+++ gcc/doc/install.texi	(Arbeitskopie)
@@ -354,7 +354,7 @@ support libraries then using those packages may be
 install the libraries.
 
 @table @asis
-@item GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
+@item GNU Multiple Precision Library (GMP) version 6.0.0 (or later)
 
 Necessary to build GCC@.  If a GMP source distribution is found in a
 subdirectory of your GCC sources named @file{gmp}, it will be built
@@ -362,8 +362,9 @@ together with GCC.  Alternatively, if GMP is alrea
 is not in your library search path, you will have to configure with the
 @option{--with-gmp} configure option.  See also @option{--with-gmp-lib}
 and @option{--with-gmp-include}.
+The in-tree build is only supported with GMP version 6.1.0 (or later).
 
-@item MPFR Library version 2.4.2 (or later)
+@item MPFR Library version 3.1.1 (or later)
 
 Necessary to build GCC@.  It can be downloaded from
 @uref{http://www.mpfr.org/}.  If an MPFR source distribution is found
@@ -373,7 +374,7 @@ but it is not in your default library search path,
 @option{--with-mpfr} configure option should be used.  See also
 @option{--with-mpfr-lib} and @option{--with-mpfr-include}.
 
-@item MPC Library version 0.8.1 (or later)
+@item MPC Library version 0.9 (or later)
 
 Necessary to build GCC@.  It can be downloaded from
 @uref{http://www.multiprecision.org/}.  If an MPC source distribution
Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c	(Revision 235487)
+++ gcc/fortran/simplify.c	(Arbeitskopie)
@@ -2455,12 +2455,7 @@ gfc_expr *
 gfc_simplify_fraction (gfc_expr *x)
 {
   gfc_expr *result;
-
-#if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0)
-  mpfr_t absv, exp, pow2;
-#else
   mpfr_exp_t e;
-#endif
 
   if (x->expr_type != EXPR_CONSTANT)
     return NULL;
@@ -2474,41 +2469,9 @@ gfc_simplify_fraction (gfc_expr *x)
       return result;
     }
 
-#if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0)
-
-  /* MPFR versions before 3.1.0 do not include mpfr_frexp.  
-     TODO: remove the kludge when MPFR 3.1.0 or newer will be required */
-
-  if (mpfr_sgn (x->value.real) == 0)
-    {
-      mpfr_set (result->value.real, x->value.real, GFC_RND_MODE);
-      return result;
-    }
-
-  gfc_set_model_kind (x->ts.kind);
-  mpfr_init (exp);
-  mpfr_init (absv);
-  mpfr_init (pow2);
-
-  mpfr_abs (absv, x->value.real, GFC_RND_MODE);
-  mpfr_log2 (exp, absv, GFC_RND_MODE);
-
-  mpfr_trunc (exp, exp);
-  mpfr_add_ui (exp, exp, 1, GFC_RND_MODE);
-
-  mpfr_ui_pow (pow2, 2, exp, GFC_RND_MODE);
-
-  mpfr_div (result->value.real, x->value.real, pow2, GFC_RND_MODE);
-
-  mpfr_clears (exp, absv, pow2, NULL);
-
-#else
-
   /* mpfr_frexp() correctly handles zeros and NaNs.  */
   mpfr_frexp (&e, result->value.real, x->value.real, GFC_RND_MODE);
 
-#endif
-
   return range_check (result, "FRACTION");
 }
 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-27 15:31   ` Bernd Edlinger
@ 2016-04-27 15:37     ` Rainer Orth
  2016-04-27 15:47       ` Bernd Edlinger
  2016-04-28  7:09     ` Richard Biener
  1 sibling, 1 reply; 29+ messages in thread
From: Rainer Orth @ 2016-04-27 15:37 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

Bernd Edlinger <bernd.edlinger@hotmail.de> writes:

> On 26.04.2016 22:14, Joseph Myers wrote:
>> On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>>
>>> Hi,
>>>
>>> as we all know, it's high time now to adjust the minimum supported
>>> gmp/mpfr/mpc versions for gcc-7.
>>
>> I think updating the minimum versions (when using previously built
>> libraries, not in-tree) is only appropriate when it allows some cleanup in
>> GCC, such as removing conditionals on whether a more recently added
>> function is available, adding functionality that depends on a newer
>> interface, or using newer interfaces instead of older ones that are now
>> deprecated.
>>
>> For example, you could justify a move to requiring MPFR 3.0.0 or later
>> with cleanups to use MPFR_RND* instead of the older GMP_RND*, and
>> similarly mpfr_rnd_t instead of the older mp_rnd_t and likewise mpfr_exp_t
>> and mpfr_prec_t in fortran/.  You could justify a move to requiring MPC
>> 1.0.0 (or 1.0.2) by optimizing clog10 using mpc_log10.  I don't know what
>> if any newer GMP interfaces would be beneficial in GCC.  And as always in
>> such cases, it's a good idea to look at e.g. how widespread the newer
>> versions are in GNU/Linux distributions, which indicates how many people
>> might be affected by an increase in the version requirement.
>>
>
> Yes I see.
>
> I would justify it this way: gmp-6.0.0 is the first version that does
> not invoke undefined behavior in gmp.h, once we update to gmp-6.0.0
> we could emit at least a warning in cstddef for this invalid code.
>
> Once we have gmp-6.0.0, the earliest mpfr version that compiles at all
> is mpfr-3.1.1 and the earliest mpc version that compiles at all is
> mpc-0.9.  This would be the supported installed versions.
>
> In-tree gmp-6.0.0 does _not_ work for ARM.  But gmp-6.1.0 does (with a
> little quirk).  All supported mpfr and mpc versions are working in-tree
> too, even for the ARM target.
>
> When we have at least mpfr-3.1.1, it is straight forward to remove the
> pre-3.1.0 compatibility code from gcc/fortran/simplify.c for instance.
>
> So I would propose this updated patch for gcc-7.

would this version combo (gmp 6.0.0, mpfr 3.1.1, mpc 0.9) also work on
the active release branches (gcc-5 and gcc-6, gcc-4.9 is on it's way
out)?  Having to install two different sets of the libraries for trunk
and branch work would be extremely tedious.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-27 15:37     ` Rainer Orth
@ 2016-04-27 15:47       ` Bernd Edlinger
  2016-04-29  8:53         ` Rainer Orth
  2016-09-22 17:32         ` Martin Sebor
  0 siblings, 2 replies; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-27 15:47 UTC (permalink / raw)
  To: Rainer Orth
  Cc: Joseph Myers, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely



Am 27.04.2016 um 17:37 schrieb Rainer Orth:
> Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
>
>> On 26.04.2016 22:14, Joseph Myers wrote:
>>> On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>>>
>>>> Hi,
>>>>
>>>> as we all know, it's high time now to adjust the minimum supported
>>>> gmp/mpfr/mpc versions for gcc-7.
>>>
>>> I think updating the minimum versions (when using previously built
>>> libraries, not in-tree) is only appropriate when it allows some cleanup in
>>> GCC, such as removing conditionals on whether a more recently added
>>> function is available, adding functionality that depends on a newer
>>> interface, or using newer interfaces instead of older ones that are now
>>> deprecated.
>>>
>>> For example, you could justify a move to requiring MPFR 3.0.0 or later
>>> with cleanups to use MPFR_RND* instead of the older GMP_RND*, and
>>> similarly mpfr_rnd_t instead of the older mp_rnd_t and likewise mpfr_exp_t
>>> and mpfr_prec_t in fortran/.  You could justify a move to requiring MPC
>>> 1.0.0 (or 1.0.2) by optimizing clog10 using mpc_log10.  I don't know what
>>> if any newer GMP interfaces would be beneficial in GCC.  And as always in
>>> such cases, it's a good idea to look at e.g. how widespread the newer
>>> versions are in GNU/Linux distributions, which indicates how many people
>>> might be affected by an increase in the version requirement.
>>>
>>
>> Yes I see.
>>
>> I would justify it this way: gmp-6.0.0 is the first version that does
>> not invoke undefined behavior in gmp.h, once we update to gmp-6.0.0
>> we could emit at least a warning in cstddef for this invalid code.
>>
>> Once we have gmp-6.0.0, the earliest mpfr version that compiles at all
>> is mpfr-3.1.1 and the earliest mpc version that compiles at all is
>> mpc-0.9.  This would be the supported installed versions.
>>
>> In-tree gmp-6.0.0 does _not_ work for ARM.  But gmp-6.1.0 does (with a
>> little quirk).  All supported mpfr and mpc versions are working in-tree
>> too, even for the ARM target.
>>
>> When we have at least mpfr-3.1.1, it is straight forward to remove the
>> pre-3.1.0 compatibility code from gcc/fortran/simplify.c for instance.
>>
>> So I would propose this updated patch for gcc-7.
>
> would this version combo (gmp 6.0.0, mpfr 3.1.1, mpc 0.9) also work on
> the active release branches (gcc-5 and gcc-6, gcc-4.9 is on it's way
> out)?  Having to install two different sets of the libraries for trunk
> and branch work would be extremely tedious.
>
> 	Rainer
>

Yes, when they are pre-installed there should be no problem.
Also newer versions than these seem to work.

In-tree only the versions that download_prerequisite picks are
tested and guaranteed to work.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-27 15:31   ` Bernd Edlinger
  2016-04-27 15:37     ` Rainer Orth
@ 2016-04-28  7:09     ` Richard Biener
       [not found]       ` <AM4PR07MB157126273516C6B5E78F4052E4650@AM4PR07MB1571.eurprd07.prod.outlook.com>
  2016-05-03 20:05       ` [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
  1 sibling, 2 replies; 29+ messages in thread
From: Richard Biener @ 2016-04-28  7:09 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Wed, 27 Apr 2016, Bernd Edlinger wrote:

> On 26.04.2016 22:14, Joseph Myers wrote:
> > On Tue, 26 Apr 2016, Bernd Edlinger wrote:
> >
> >> Hi,
> >>
> >> as we all know, it's high time now to adjust the minimum supported
> >> gmp/mpfr/mpc versions for gcc-7.
> >
> > I think updating the minimum versions (when using previously built
> > libraries, not in-tree) is only appropriate when it allows some cleanup in
> > GCC, such as removing conditionals on whether a more recently added
> > function is available, adding functionality that depends on a newer
> > interface, or using newer interfaces instead of older ones that are now
> > deprecated.
> >
> > For example, you could justify a move to requiring MPFR 3.0.0 or later
> > with cleanups to use MPFR_RND* instead of the older GMP_RND*, and
> > similarly mpfr_rnd_t instead of the older mp_rnd_t and likewise mpfr_exp_t
> > and mpfr_prec_t in fortran/.  You could justify a move to requiring MPC
> > 1.0.0 (or 1.0.2) by optimizing clog10 using mpc_log10.  I don't know what
> > if any newer GMP interfaces would be beneficial in GCC.  And as always in
> > such cases, it's a good idea to look at e.g. how widespread the newer
> > versions are in GNU/Linux distributions, which indicates how many people
> > might be affected by an increase in the version requirement.
> >
> 
> Yes I see.
> 
> I would justify it this way: gmp-6.0.0 is the first version that does
> not invoke undefined behavior in gmp.h, once we update to gmp-6.0.0
> we could emit at least a warning in cstddef for this invalid code.
> 
> Once we have gmp-6.0.0, the earliest mpfr version that compiles at all
> is mpfr-3.1.1 and the earliest mpc version that compiles at all is
> mpc-0.9.  This would be the supported installed versions.
> 
> In-tree gmp-6.0.0 does _not_ work for ARM.  But gmp-6.1.0 does (with a
> little quirk).  All supported mpfr and mpc versions are working in-tree
> too, even for the ARM target.
> 
> When we have at least mpfr-3.1.1, it is straight forward to remove the
> pre-3.1.0 compatibility code from gcc/fortran/simplify.c for instance.
> 
> So I would propose this updated patch for gcc-7.

As said elsewhere the main reason for all of this is to make the
in-tree builds work better for newer archs that are not happy with
the versions provided by download_prerequesites.  This should come
with a documentation adjustment that the only tested in-tree
versions are those downloaded by dowload_prerequesites.

Please address updating the minimum supported _installed_ version
separately (in fact I do maintain a patch to disable stuff to be
able to go back to even older mpfr versions ... :/).

SLES 11 ships with mpfr 2.3.2, mpc 0.8 and gmp 4.2.3 while SLES 12
and openSUSE Leap have gmp 5.1.3, mpfr 3.1.2 and mpc 1.0.2.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
       [not found]       ` <AM4PR07MB157126273516C6B5E78F4052E4650@AM4PR07MB1571.eurprd07.prod.outlook.com>
@ 2016-04-28 12:35         ` Richard Biener
  2016-04-28 14:22           ` Bernd Edlinger
  0 siblings, 1 reply; 29+ messages in thread
From: Richard Biener @ 2016-04-28 12:35 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Thu, 28 Apr 2016, Bernd Edlinger wrote:

> Hi,
> 
> here is the first part of the patch that addresses only the in-tree
> builds.  I tried different combinations of the documented supported
> in-tree versions, and all combinations seem to work.
> Then I changed the download_prerequisites batch to pick each pre-
> requisite's minimum version (that part is not tested, because I have
> no way to update the gcc.gnu.org ftp server).
> 
> Various boot-straps for x86_64-linux-gnu and armv7-linux-gnueabihf
> were successful.
> 
> Is it OK for trunk?

Please do not document that in-tree versions greater than XXX are
supported, instead just point at download_prerequesites.

Why do you not update to latest mpc (there is 1.0.3) and mpfr but leave 
bugfixes for mpfr on the plate (there is 3.1.4).

Does it make sense to wait for a new GMP release that allows to get
rid of -DNO_ASM?

I will upload mpfr 3.1.4 and mpc 1.0.3.

Thanks,
Richard.

> Thanks
> Bernd.
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
  2016-04-28 12:35         ` [PATCH] Update gmp/mpfr/mpc in-tree versions Richard Biener
@ 2016-04-28 14:22           ` Bernd Edlinger
  2016-04-28 14:30             ` Richard Biener
  0 siblings, 1 reply; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-28 14:22 UTC (permalink / raw)
  To: Richard Biener
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

On 28.04.2016 14:35, Richard Biener wrote:
> On Thu, 28 Apr 2016, Bernd Edlinger wrote:
>
>> Hi,
>>
>> here is the first part of the patch that addresses only the in-tree
>> builds.  I tried different combinations of the documented supported
>> in-tree versions, and all combinations seem to work.
>> Then I changed the download_prerequisites batch to pick each pre-
>> requisite's minimum version (that part is not tested, because I have
>> no way to update the gcc.gnu.org ftp server).
>>
>> Various boot-straps for x86_64-linux-gnu and armv7-linux-gnueabihf
>> were successful.
>>
>> Is it OK for trunk?
>
> Please do not document that in-tree versions greater than XXX are
> supported, instead just point at download_prerequesites.
>

OK, done.

> Why do you not update to latest mpc (there is 1.0.3) and mpfr but leave
> bugfixes for mpfr on the plate (there is 3.1.4).
>

There's not really a good reason for that choice.

I just started with the latest version, and later moved to older
versions, because I did not want to restrict the supported versions
more than absolutely necessary, not even in-tree.

Are there any bug-fixes that we could depend upon?

> Does it make sense to wait for a new GMP release that allows to get
> rid of -DNO_ASM?
>

I was _very_ surprised that gmp-6.0.0 did at first work in-tree but
enabled invalid assembly code, in gmp-6.0.0/mpn/generic/div_qr_1n_pi1.c
when __arm__ or __sparc__ or __s390x__ is defined together with NO_ASM.

All in all GMP contains really much assembler code that we don't need
at all, my impression is that it is nearly impossible to test GMP
on every possible target, although it is all about mathematics.
So at least some choice would be good for us.

In that sense, I would not like to restrict the supported GMP versions
to just one version, that is not even released at this time.

> I will upload mpfr 3.1.4 and mpc 1.0.3.
>

Good.  I updated the download_prerequsites to mpfr-3.1.4 and mpc-1.0.3
again, but left gmp-6.1.0 at the moment.


Thanks,
Bernd.

[-- Attachment #2: changelog-gmp-intree.txt --]
[-- Type: text/plain, Size: 552 bytes --]

2016-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code.
	* configure: Regenerated.
	* Makefile.def (gmp): Explicitly disable assembler.
	(mpfr): Adjust lib_path.
	(mpc): Likewise.
	* Makefile.in: Regenerated.

gcc/
2016-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* doc/install.texi: Document supported in-tree gmp/mpfr/mpc versions.

contrib/
2016-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* download_prerequisites: Adjust gmp/mpfr/mpc versions.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch-gmp-intree.diff --]
[-- Type: text/x-patch; name="patch-gmp-intree.diff", Size: 16958 bytes --]

Index: Makefile.def
===================================================================
--- Makefile.def	(Revision 235487)
+++ Makefile.def	(Arbeitskopie)
@@ -50,6 +50,7 @@ host_modules= { module= gcc; bootstrap=true;
 host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
 		// Work around in-tree gmp configure bug with missing flex.
 		extra_configure_flags='--disable-shared LEX="touch lex.yy.c"';
+		extra_make_flags='AM_CFLAGS="-DNO_ASM"';
 		no_install= true;
 		// none-*-* disables asm optimizations, bootstrap-testing
 		// the compiler more thoroughly.
@@ -57,11 +58,11 @@ host_modules= { module= gmp; lib_path=.libs; boots
 		// gmp's configure will complain if given anything
 		// different from host for target.
 	        target="none-${host_vendor}-${host_os}"; };
-host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
+host_modules= { module= mpfr; lib_path=src/.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
 		extra_make_flags='AM_CFLAGS="-DNO_ASM"';
 		no_install= true; };
-host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
+host_modules= { module= mpc; lib_path=src/.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
 		no_install= true; };
 host_modules= { module= isl; lib_path=.libs; bootstrap=true;
Index: Makefile.in
===================================================================
--- Makefile.in	(Revision 235487)
+++ Makefile.in	(Arbeitskopie)
@@ -639,12 +639,12 @@ HOST_LIB_PATH_gmp = \
 
 @if mpfr
 HOST_LIB_PATH_mpfr = \
-  $$r/$(HOST_SUBDIR)/mpfr/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/.libs:
+  $$r/$(HOST_SUBDIR)/mpfr/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/src/.libs:
 @endif mpfr
 
 @if mpc
 HOST_LIB_PATH_mpc = \
-  $$r/$(HOST_SUBDIR)/mpc/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/.libs:
+  $$r/$(HOST_SUBDIR)/mpc/src/.libs:$$r/$(HOST_SUBDIR)/prev-mpc/src/.libs:
 @endif mpc
 
 @if isl
@@ -11300,7 +11300,7 @@ all-gmp: configure-gmp
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/gmp && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		$(TARGET-gmp))
 @endif gmp
 
@@ -11329,7 +11329,7 @@ all-stage1-gmp: configure-stage1-gmp
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
 		$(EXTRA_HOST_FLAGS)  \
-		$(STAGE1_FLAGS_TO_PASS)  \
+		$(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE1_TFLAGS)" \
 		$(TARGET-stage1-gmp)
 
@@ -11344,7 +11344,7 @@ clean-stage1-gmp:
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
 	$(MAKE) $(EXTRA_HOST_FLAGS)  \
-	$(STAGE1_FLAGS_TO_PASS)  clean
+	$(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11371,7 +11371,7 @@ all-stage2-gmp: configure-stage2-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE2_TFLAGS)" \
 		$(TARGET-stage2-gmp)
 
@@ -11385,7 +11385,7 @@ clean-stage2-gmp:
 	  $(MAKE) stage2-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11412,7 +11412,7 @@ all-stage3-gmp: configure-stage3-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE3_TFLAGS)" \
 		$(TARGET-stage3-gmp)
 
@@ -11426,7 +11426,7 @@ clean-stage3-gmp:
 	  $(MAKE) stage3-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11453,7 +11453,7 @@ all-stage4-gmp: configure-stage4-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGE4_TFLAGS)" \
 		$(TARGET-stage4-gmp)
 
@@ -11467,7 +11467,7 @@ clean-stage4-gmp:
 	  $(MAKE) stage4-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11494,7 +11494,7 @@ all-stageprofile-gmp: configure-stageprofile-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGEprofile_TFLAGS)" \
 		$(TARGET-stageprofile-gmp)
 
@@ -11508,7 +11508,7 @@ clean-stageprofile-gmp:
 	  $(MAKE) stageprofile-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11535,7 +11535,7 @@ all-stagefeedback-gmp: configure-stagefeedback-gmp
 		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
 		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
-		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
 		TFLAGS="$(STAGEfeedback_TFLAGS)" \
 		$(TARGET-stagefeedback-gmp)
 
@@ -11549,7 +11549,7 @@ clean-stagefeedback-gmp:
 	  $(MAKE) stagefeedback-start; \
 	fi; \
 	cd $(HOST_SUBDIR)/gmp && \
-	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
 @endif gmp-bootstrap
 
 
@@ -11567,7 +11567,7 @@ check-gmp:
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
 	(cd $(HOST_SUBDIR)/gmp && \
-	  $(MAKE) $(FLAGS_TO_PASS)  $(EXTRA_BOOTSTRAP_FLAGS) check)
+	  $(MAKE) $(FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" $(EXTRA_BOOTSTRAP_FLAGS) check)
 
 @endif gmp
 
@@ -11602,7 +11602,7 @@ info-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing info in gmp"; \
@@ -11627,7 +11627,7 @@ dvi-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing dvi in gmp"; \
@@ -11652,7 +11652,7 @@ pdf-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing pdf in gmp"; \
@@ -11677,7 +11677,7 @@ html-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing html in gmp"; \
@@ -11702,7 +11702,7 @@ TAGS-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing TAGS in gmp"; \
@@ -11728,7 +11728,7 @@ install-info-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-info in gmp"; \
@@ -11754,7 +11754,7 @@ install-pdf-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-pdf in gmp"; \
@@ -11780,7 +11780,7 @@ install-html-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing install-html in gmp"; \
@@ -11805,7 +11805,7 @@ installcheck-gmp: \
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing installcheck in gmp"; \
@@ -11829,7 +11829,7 @@ mostlyclean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing mostlyclean in gmp"; \
@@ -11853,7 +11853,7 @@ clean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing clean in gmp"; \
@@ -11877,7 +11877,7 @@ distclean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing distclean in gmp"; \
@@ -11901,7 +11901,7 @@ maintainer-clean-gmp:
 	r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
 	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
 	done; \
 	echo "Doing maintainer-clean in gmp"; \
Index: configure
===================================================================
--- configure	(Revision 235487)
+++ configure	(Arbeitskopie)
@@ -5570,16 +5570,9 @@ if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
-  # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
Index: configure.ac
===================================================================
--- configure.ac	(Revision 235487)
+++ configure.ac	(Arbeitskopie)
@@ -1550,16 +1550,9 @@ if test "x$with_mpfr_lib" != x; then
   gmplibs="-L$with_mpfr_lib $gmplibs"
 fi
 if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
-  # MPFR v3.1.0 moved the sources into a src sub-directory.
-  if test -d ${srcdir}/mpfr/src; then
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
-  else
-    gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
-    gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
-    extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
-  fi
+  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+  extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
   # Do not test the mpfr version.  Assume that it is sufficient, since
   # it is in the source tree, and the library has not been built yet
   # but it would be included on the link line in the version check below
Index: contrib/download_prerequisites
===================================================================
--- contrib/download_prerequisites	(Revision 235487)
+++ contrib/download_prerequisites	(Arbeitskopie)
@@ -4,7 +4,7 @@
 # Run this from the top level of the gcc source tree and the gcc
 # build will do the right thing.
 #
-# (C) 2010 Free Software Foundation
+# (C) 2010-2016 Free Software Foundation
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,9 +30,9 @@ if [ ! -e gcc/BASE-VER ] ; then
 fi
 
 # Necessary to build GCC.
-MPFR=mpfr-2.4.2
-GMP=gmp-4.3.2
-MPC=mpc-0.8.1
+MPFR=mpfr-3.1.4
+GMP=gmp-6.1.0
+MPC=mpc-1.0.3
 
 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1
 tar xjf $MPFR.tar.bz2 || exit 1
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(Revision 235487)
+++ gcc/doc/install.texi	(Arbeitskopie)
@@ -362,6 +362,8 @@ together with GCC.  Alternatively, if GMP is alrea
 is not in your library search path, you will have to configure with the
 @option{--with-gmp} configure option.  See also @option{--with-gmp-lib}
 and @option{--with-gmp-include}.
+The in-tree build is only supported with the GMP version that
+download_prerequisites installs.
 
 @item MPFR Library version 2.4.2 (or later)
 
@@ -372,6 +374,8 @@ built together with GCC.  Alternatively, if MPFR i
 but it is not in your default library search path, the
 @option{--with-mpfr} configure option should be used.  See also
 @option{--with-mpfr-lib} and @option{--with-mpfr-include}.
+The in-tree build is only supported with the MPFR version that
+download_prerequisites installs.
 
 @item MPC Library version 0.8.1 (or later)
 
@@ -382,6 +386,8 @@ will be built together with GCC.  Alternatively, i
 installed but it is not in your default library search path, the
 @option{--with-mpc} configure option should be used.  See also
 @option{--with-mpc-lib} and @option{--with-mpc-include}.
+The in-tree build is only supported with the MPC version that
+download_prerequisites installs.
 
 @item isl Library version 0.16, 0.15, or 0.14.
 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
  2016-04-28 14:22           ` Bernd Edlinger
@ 2016-04-28 14:30             ` Richard Biener
  2016-04-28 16:25               ` Bernd Edlinger
  0 siblings, 1 reply; 29+ messages in thread
From: Richard Biener @ 2016-04-28 14:30 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Thu, 28 Apr 2016, Bernd Edlinger wrote:

> On 28.04.2016 14:35, Richard Biener wrote:
> > On Thu, 28 Apr 2016, Bernd Edlinger wrote:
> >
> >> Hi,
> >>
> >> here is the first part of the patch that addresses only the in-tree
> >> builds.  I tried different combinations of the documented supported
> >> in-tree versions, and all combinations seem to work.
> >> Then I changed the download_prerequisites batch to pick each pre-
> >> requisite's minimum version (that part is not tested, because I have
> >> no way to update the gcc.gnu.org ftp server).
> >>
> >> Various boot-straps for x86_64-linux-gnu and armv7-linux-gnueabihf
> >> were successful.
> >>
> >> Is it OK for trunk?
> >
> > Please do not document that in-tree versions greater than XXX are
> > supported, instead just point at download_prerequesites.
> >
> 
> OK, done.
> 
> > Why do you not update to latest mpc (there is 1.0.3) and mpfr but leave
> > bugfixes for mpfr on the plate (there is 3.1.4).
> >
> 
> There's not really a good reason for that choice.
> 
> I just started with the latest version, and later moved to older
> versions, because I did not want to restrict the supported versions
> more than absolutely necessary, not even in-tree.
> 
> Are there any bug-fixes that we could depend upon?
> 
> > Does it make sense to wait for a new GMP release that allows to get
> > rid of -DNO_ASM?
> >
> 
> I was _very_ surprised that gmp-6.0.0 did at first work in-tree but
> enabled invalid assembly code, in gmp-6.0.0/mpn/generic/div_qr_1n_pi1.c
> when __arm__ or __sparc__ or __s390x__ is defined together with NO_ASM.
> 
> All in all GMP contains really much assembler code that we don't need
> at all, my impression is that it is nearly impossible to test GMP
> on every possible target, although it is all about mathematics.
> So at least some choice would be good for us.
> 
> In that sense, I would not like to restrict the supported GMP versions
> to just one version, that is not even released at this time.

Another option would be to try if mini-gmp is enough for our
(in-tree) use and what the performance impact would be if we'd
use that (in-tree).

> > I will upload mpfr 3.1.4 and mpc 1.0.3.
> >
> 
> Good.  I updated the download_prerequsites to mpfr-3.1.4 and mpc-1.0.3
> again, but left gmp-6.1.0 at the moment.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
  2016-04-28 14:30             ` Richard Biener
@ 2016-04-28 16:25               ` Bernd Edlinger
  2016-04-29  7:46                 ` Richard Biener
  0 siblings, 1 reply; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-28 16:25 UTC (permalink / raw)
  To: Richard Biener
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On 28.04.2016 16:29, Richard Biener wrote:
>
> Another option would be to try if mini-gmp is enough for our
> (in-tree) use and what the performance impact would be if we'd
> use that (in-tree).
>

Yes, we would certainly never need more than that subset.

But I don't see how mpfr can be built with mini-gmp.
I tried to and failed early in mpfr/configure.
Any ideas?

Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
  2016-04-28 16:25               ` Bernd Edlinger
@ 2016-04-29  7:46                 ` Richard Biener
  2016-04-29 13:26                   ` Bernd Edlinger
  0 siblings, 1 reply; 29+ messages in thread
From: Richard Biener @ 2016-04-29  7:46 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Thu, 28 Apr 2016, Bernd Edlinger wrote:

> On 28.04.2016 16:29, Richard Biener wrote:
> >
> > Another option would be to try if mini-gmp is enough for our
> > (in-tree) use and what the performance impact would be if we'd
> > use that (in-tree).
> >
> 
> Yes, we would certainly never need more than that subset.
> 
> But I don't see how mpfr can be built with mini-gmp.
> I tried to and failed early in mpfr/configure.
> Any ideas?

No idea - it of course breaks down if mpfr cannot work with mini-gmp.

Richard.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-27 15:47       ` Bernd Edlinger
@ 2016-04-29  8:53         ` Rainer Orth
  2016-09-22 17:32         ` Martin Sebor
  1 sibling, 0 replies; 29+ messages in thread
From: Rainer Orth @ 2016-04-29  8:53 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

Hi Bernd,

>> would this version combo (gmp 6.0.0, mpfr 3.1.1, mpc 0.9) also work on
>> the active release branches (gcc-5 and gcc-6, gcc-4.9 is on it's way
>> out)?  Having to install two different sets of the libraries for trunk
>> and branch work would be extremely tedious.
>>
>> 	Rainer
>>
>
> Yes, when they are pre-installed there should be no problem.
> Also newer versions than these seem to work.
>
> In-tree only the versions that download_prerequisite picks are
> tested and guaranteed to work.

fine with me: I never cared about (or even got the point of) in-tree
builds of this stuff.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
  2016-04-29  7:46                 ` Richard Biener
@ 2016-04-29 13:26                   ` Bernd Edlinger
  2016-05-02  6:50                     ` Richard Biener
  0 siblings, 1 reply; 29+ messages in thread
From: Bernd Edlinger @ 2016-04-29 13:26 UTC (permalink / raw)
  To: Richard Biener
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On 29.04.2016 09:46, Richard Biener wrote:
> On Thu, 28 Apr 2016, Bernd Edlinger wrote:
>
>> On 28.04.2016 16:29, Richard Biener wrote:
>>>
>>> Another option would be to try if mini-gmp is enough for our
>>> (in-tree) use and what the performance impact would be if we'd
>>> use that (in-tree).
>>>
>>
>> Yes, we would certainly never need more than that subset.
>>
>> But I don't see how mpfr can be built with mini-gmp.
>> I tried to and failed early in mpfr/configure.
>> Any ideas?
>
> No idea - it of course breaks down if mpfr cannot work with mini-gmp.
>

Yes, that's how it looks like.

Frankly speaking, I think we should start testing with 6.1.0
(with -DNO_ASM of course, but that should be safe at least)
and if anything goes wrong, we can still try to get it fixed in 6.1.1,
as long as it is not yet released.


Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] Update gmp/mpfr/mpc in-tree versions
  2016-04-29 13:26                   ` Bernd Edlinger
@ 2016-05-02  6:50                     ` Richard Biener
  0 siblings, 0 replies; 29+ messages in thread
From: Richard Biener @ 2016-05-02  6:50 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Fri, 29 Apr 2016, Bernd Edlinger wrote:

> On 29.04.2016 09:46, Richard Biener wrote:
> > On Thu, 28 Apr 2016, Bernd Edlinger wrote:
> >
> >> On 28.04.2016 16:29, Richard Biener wrote:
> >>>
> >>> Another option would be to try if mini-gmp is enough for our
> >>> (in-tree) use and what the performance impact would be if we'd
> >>> use that (in-tree).
> >>>
> >>
> >> Yes, we would certainly never need more than that subset.
> >>
> >> But I don't see how mpfr can be built with mini-gmp.
> >> I tried to and failed early in mpfr/configure.
> >> Any ideas?
> >
> > No idea - it of course breaks down if mpfr cannot work with mini-gmp.
> >
> 
> Yes, that's how it looks like.
> 
> Frankly speaking, I think we should start testing with 6.1.0
> (with -DNO_ASM of course, but that should be safe at least)
> and if anything goes wrong, we can still try to get it fixed in 6.1.1,
> as long as it is not yet released.

Fair enough - I'm fine with your latest patch then unless somebody
objects soon.  Does it fix any reported PRs?  If so, please mention
them in the ChangeLog entries.

I've up-lodaed GMP 6.1.0 as well now.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-28  7:09     ` Richard Biener
       [not found]       ` <AM4PR07MB157126273516C6B5E78F4052E4650@AM4PR07MB1571.eurprd07.prod.outlook.com>
@ 2016-05-03 20:05       ` Bernd Edlinger
  2016-05-04  7:46         ` Richard Biener
  1 sibling, 1 reply; 29+ messages in thread
From: Bernd Edlinger @ 2016-05-03 20:05 UTC (permalink / raw)
  To: Richard Biener
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]

On 28.04.2016 09:09, Richard Biener wrote:
>
> As said elsewhere the main reason for all of this is to make the
> in-tree builds work better for newer archs that are not happy with
> the versions provided by download_prerequesites.  This should come
> with a documentation adjustment that the only tested in-tree
> versions are those downloaded by dowload_prerequesites.

That patch is installed now, and so far nothing bad has happened.

> Please address updating the minimum supported _installed_ version
> separately (in fact I do maintain a patch to disable stuff to be
> able to go back to even older mpfr versions ... :/).
>
> SLES 11 ships with mpfr 2.3.2, mpc 0.8 and gmp 4.2.3 while SLES 12
> and openSUSE Leap have gmp 5.1.3, mpfr 3.1.2 and mpc 1.0.2.

Of course updating to a more recent gmp version is not the most
important thing in the world, and I am not trying to make gcc emit
an error when compiling gmp 5.1.3, but I think emitting a warning
for this code would be fair.

So here is the next step.

This patch raises the installed gmp version to 6.0.0 or higher,
the installed mpfr version to 3.1.1 or higher and the
installed mpc version to 0.9 or higher.  So Jakub's currently
installed versions will be fine, even a bit older versions
will work, but unfortunately gmp 5.1.3 will not work.

I also attached a sketch of what I'd like to propose on the
libstdc++ list, once we can rely on the gmp.h not to trigger
these new warnings in cstddef.  With the gmp 5.1.3 or earlier
one of this warnings made the boot-strap fail in stage2.

Boot-strapped and reg-tested on x86_64-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.

[-- Attachment #2: changelog-gmp-update.txt --]
[-- Type: text/plain, Size: 458 bytes --]

2016-05-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* configure.ac (mpfr): Adjust check to new minimum gmp, mpfr and mpc
	versions.
	* configure: Regenerated.

gcc/
2016-05-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* doc/install.texi: Adjust gmp/mpfr/mpc minimum versions.

gcc/fortran/
2016-05-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* simplify.c (gfc_simplify_fraction): Remove pre-3.1.0 mpfr
	compatibility code.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch-gmp-update.diff --]
[-- Type: text/x-patch; name="patch-gmp-update.diff", Size: 9173 bytes --]

Index: configure
===================================================================
--- configure	(revision 235816)
+++ configure	(working copy)
@@ -5640,24 +5640,6 @@ $as_echo_n "checking for the correct version of gm
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include "gmp.h"
-int
-main ()
-{
-
-  #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-  #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3)
-  choke me
-  #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 #include <gmp.h>
 int
 main ()
@@ -5665,7 +5647,7 @@ main ()
 
   #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
   #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
+  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(6,0,0)
   choke me
   #endif
 
@@ -5677,11 +5659,6 @@ if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; have_gmp=no
 fi
@@ -5700,7 +5677,7 @@ int
 main ()
 {
 
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+    #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,1)
     choke me
     #endif
 
@@ -5709,31 +5686,9 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <gmp.h>
-    #include <mpfr.h>
-int
-main ()
-{
-
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
-    choke me
-    #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; have_gmp=no
 fi
@@ -5752,7 +5707,7 @@ int
 main ()
 {
 
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
+    #if MPC_VERSION < MPC_VERSION_NUM(0,9,0)
     choke me
     #endif
 
@@ -5761,30 +5716,9 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <mpc.h>
-int
-main ()
-{
-
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
-    choke me
-    #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; have_gmp=no
 fi
Index: configure.ac
===================================================================
--- configure.ac	(revision 235816)
+++ configure.ac	(working copy)
@@ -1606,20 +1606,14 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xn
   CFLAGS="$CFLAGS $gmpinc"
   # Check for the recommended and required versions of GMP.
   AC_MSG_CHECKING([for the correct version of gmp.h])
-  AC_TRY_COMPILE([#include "gmp.h"],[
+  AC_TRY_COMPILE([#include <gmp.h>],[
   #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
   #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,2,3)
+  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(6,0,0)
   choke me
   #endif
-  ], [AC_TRY_COMPILE([#include <gmp.h>],[
-  #define GCC_GMP_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-  #define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL)
-  #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
-  choke me
-  #endif
-  ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
-   [AC_MSG_RESULT([no]); have_gmp=no])
+  ], [AC_MSG_RESULT([yes])],
+     [AC_MSG_RESULT([no]); have_gmp=no])
 
   # If we have GMP, check the MPFR version.
   if test x"$have_gmp" = xyes; then
@@ -1627,16 +1621,11 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xn
     AC_MSG_CHECKING([for the correct version of mpfr.h])
     AC_TRY_COMPILE([#include <gmp.h>
     #include <mpfr.h>],[
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+    #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,1)
     choke me
     #endif
-    ], [AC_TRY_COMPILE([#include <gmp.h>
-    #include <mpfr.h>],[
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2)
-    choke me
-    #endif
-    ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
-     [AC_MSG_RESULT([no]); have_gmp=no])
+    ], [AC_MSG_RESULT([yes])],
+       [AC_MSG_RESULT([no]); have_gmp=no])
   fi
 
   # Check for the MPC header version.
@@ -1644,15 +1633,11 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xn
     # Check for the recommended and required versions of MPC.
     AC_MSG_CHECKING([for the correct version of mpc.h])
     AC_TRY_COMPILE([#include <mpc.h>],[
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,0)
+    #if MPC_VERSION < MPC_VERSION_NUM(0,9,0)
     choke me
     #endif
-    ], [AC_TRY_COMPILE([#include <mpc.h>],[
-    #if MPC_VERSION < MPC_VERSION_NUM(0,8,1)
-    choke me
-    #endif
-    ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
-     [AC_MSG_RESULT([no]); have_gmp=no])
+    ], [AC_MSG_RESULT([yes])],
+       [AC_MSG_RESULT([no]); have_gmp=no])
   fi
 
   # Now check the MPFR library.
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi	(revision 235816)
+++ gcc/doc/install.texi	(working copy)
@@ -354,7 +354,7 @@ support libraries then using those packages may be
 install the libraries.
 
 @table @asis
-@item GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
+@item GNU Multiple Precision Library (GMP) version 6.0.0 (or later)
 
 Necessary to build GCC@.  If a GMP source distribution is found in a
 subdirectory of your GCC sources named @file{gmp}, it will be built
@@ -365,7 +365,7 @@ and @option{--with-gmp-include}.
 The in-tree build is only supported with the GMP version that
 download_prerequisites installs.
 
-@item MPFR Library version 2.4.2 (or later)
+@item MPFR Library version 3.1.1 (or later)
 
 Necessary to build GCC@.  It can be downloaded from
 @uref{http://www.mpfr.org/}.  If an MPFR source distribution is found
@@ -377,7 +377,7 @@ but it is not in your default library search path,
 The in-tree build is only supported with the MPFR version that
 download_prerequisites installs.
 
-@item MPC Library version 0.8.1 (or later)
+@item MPC Library version 0.9 (or later)
 
 Necessary to build GCC@.  It can be downloaded from
 @uref{http://www.multiprecision.org/}.  If an MPC source distribution
Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c	(revision 235816)
+++ gcc/fortran/simplify.c	(working copy)
@@ -2455,12 +2455,7 @@ gfc_expr *
 gfc_simplify_fraction (gfc_expr *x)
 {
   gfc_expr *result;
-
-#if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0)
-  mpfr_t absv, exp, pow2;
-#else
   mpfr_exp_t e;
-#endif
 
   if (x->expr_type != EXPR_CONSTANT)
     return NULL;
@@ -2474,41 +2469,9 @@ gfc_simplify_fraction (gfc_expr *x)
       return result;
     }
 
-#if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0)
-
-  /* MPFR versions before 3.1.0 do not include mpfr_frexp.  
-     TODO: remove the kludge when MPFR 3.1.0 or newer will be required */
-
-  if (mpfr_sgn (x->value.real) == 0)
-    {
-      mpfr_set (result->value.real, x->value.real, GFC_RND_MODE);
-      return result;
-    }
-
-  gfc_set_model_kind (x->ts.kind);
-  mpfr_init (exp);
-  mpfr_init (absv);
-  mpfr_init (pow2);
-
-  mpfr_abs (absv, x->value.real, GFC_RND_MODE);
-  mpfr_log2 (exp, absv, GFC_RND_MODE);
-
-  mpfr_trunc (exp, exp);
-  mpfr_add_ui (exp, exp, 1, GFC_RND_MODE);
-
-  mpfr_ui_pow (pow2, 2, exp, GFC_RND_MODE);
-
-  mpfr_div (result->value.real, x->value.real, pow2, GFC_RND_MODE);
-
-  mpfr_clears (exp, absv, pow2, NULL);
-
-#else
-
   /* mpfr_frexp() correctly handles zeros and NaNs.  */
   mpfr_frexp (&e, result->value.real, x->value.real, GFC_RND_MODE);
 
-#endif
-
   return range_check (result, "FRACTION");
 }
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: patch-cstddef.diff --]
[-- Type: text/x-patch; name="patch-cstddef.diff", Size: 1615 bytes --]

Index: libstdc++-v3/include/c_global/cstdarg
===================================================================
--- libstdc++-v3/include/c_global/cstdarg	(revision 235816)
+++ libstdc++-v3/include/c_global/cstdarg	(working copy)
@@ -36,15 +36,18 @@
 // ISO C++ 14882: 20.4.6  C library
 //
 
+#ifndef _GLIBCXX_CSTDARG
+#define _GLIBCXX_CSTDARG 1
+
 #pragma GCC system_header
 
+#ifdef __need___va_list
+#warning __need___va_list should not be defined here
 #undef __need___va_list
+#endif
 #include <bits/c++config.h>
 #include <stdarg.h>
 
-#ifndef _GLIBCXX_CSTDARG
-#define _GLIBCXX_CSTDARG 1
-
 // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
 #ifndef va_end
 #define va_end(ap) va_end (ap)
Index: libstdc++-v3/include/c_global/cstddef
===================================================================
--- libstdc++-v3/include/c_global/cstddef	(revision 235816)
+++ libstdc++-v3/include/c_global/cstddef	(working copy)
@@ -41,11 +41,26 @@
 
 #pragma GCC system_header
 
+#ifdef __need_wchar_t
+#warning __need_wchar_t should not be defined here
 #undef __need_wchar_t
+#endif
+#ifdef __need_ptrdiff_t
+#warning __need_ptrdiff_t should not be defined here
 #undef __need_ptrdiff_t
+#endif
+#ifdef __need_size_t
+#warning __need_size_t should not be defined here
 #undef __need_size_t
+#endif
+#ifdef __need_NULL
+#warning __need_NULL should not be defined here
 #undef __need_NULL
+#endif
+#ifdef __need_wint_t
+#warning __need_wint_t should not be defined here
 #undef __need_wint_t
+#endif
 #include <bits/c++config.h>
 #include <stddef.h>
 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-05-03 20:05       ` [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
@ 2016-05-04  7:46         ` Richard Biener
  0 siblings, 0 replies; 29+ messages in thread
From: Richard Biener @ 2016-05-04  7:46 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Joseph Myers, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Tue, 3 May 2016, Bernd Edlinger wrote:

> On 28.04.2016 09:09, Richard Biener wrote:
> >
> > As said elsewhere the main reason for all of this is to make the
> > in-tree builds work better for newer archs that are not happy with
> > the versions provided by download_prerequesites.  This should come
> > with a documentation adjustment that the only tested in-tree
> > versions are those downloaded by dowload_prerequesites.
> 
> That patch is installed now, and so far nothing bad has happened.
> 
> > Please address updating the minimum supported _installed_ version
> > separately (in fact I do maintain a patch to disable stuff to be
> > able to go back to even older mpfr versions ... :/).
> >
> > SLES 11 ships with mpfr 2.3.2, mpc 0.8 and gmp 4.2.3 while SLES 12
> > and openSUSE Leap have gmp 5.1.3, mpfr 3.1.2 and mpc 1.0.2.
> 
> Of course updating to a more recent gmp version is not the most
> important thing in the world, and I am not trying to make gcc emit
> an error when compiling gmp 5.1.3, but I think emitting a warning
> for this code would be fair.
> 
> So here is the next step.
> 
> This patch raises the installed gmp version to 6.0.0 or higher,
> the installed mpfr version to 3.1.1 or higher and the
> installed mpc version to 0.9 or higher.  So Jakub's currently
> installed versions will be fine, even a bit older versions
> will work, but unfortunately gmp 5.1.3 will not work.
> 
> I also attached a sketch of what I'd like to propose on the
> libstdc++ list, once we can rely on the gmp.h not to trigger
> these new warnings in cstddef.  With the gmp 5.1.3 or earlier
> one of this warnings made the boot-strap fail in stage2.
> 
> Boot-strapped and reg-tested on x86_64-linux-gnu.
> Is it OK for trunk?

No, I don't see a compelling reason to force the minimum installed
version to be higher than today.

Richard.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-04-27 15:47       ` Bernd Edlinger
  2016-04-29  8:53         ` Rainer Orth
@ 2016-09-22 17:32         ` Martin Sebor
  2016-09-22 17:45           ` Joseph Myers
  2016-09-22 17:55           ` Bernd Edlinger
  1 sibling, 2 replies; 29+ messages in thread
From: Martin Sebor @ 2016-09-22 17:32 UTC (permalink / raw)
  To: Bernd Edlinger, Rainer Orth
  Cc: Joseph Myers, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On 04/27/2016 09:47 AM, Bernd Edlinger wrote:
>
>
> Am 27.04.2016 um 17:37 schrieb Rainer Orth:
>> Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
>>
>>> On 26.04.2016 22:14, Joseph Myers wrote:
>>>> On Tue, 26 Apr 2016, Bernd Edlinger wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> as we all know, it's high time now to adjust the minimum supported
>>>>> gmp/mpfr/mpc versions for gcc-7.
>>>>
>>>> I think updating the minimum versions (when using previously built
>>>> libraries, not in-tree) is only appropriate when it allows some cleanup in
>>>> GCC, such as removing conditionals on whether a more recently added
>>>> function is available, adding functionality that depends on a newer
>>>> interface, or using newer interfaces instead of older ones that are now
>>>> deprecated.
>>>>
>>>> For example, you could justify a move to requiring MPFR 3.0.0 or later
>>>> with cleanups to use MPFR_RND* instead of the older GMP_RND*, and
>>>> similarly mpfr_rnd_t instead of the older mp_rnd_t and likewise mpfr_exp_t
>>>> and mpfr_prec_t in fortran/.  You could justify a move to requiring MPC
>>>> 1.0.0 (or 1.0.2) by optimizing clog10 using mpc_log10.  I don't know what
>>>> if any newer GMP interfaces would be beneficial in GCC.  And as always in
>>>> such cases, it's a good idea to look at e.g. how widespread the newer
>>>> versions are in GNU/Linux distributions, which indicates how many people
>>>> might be affected by an increase in the version requirement.
>>>>
>>>
>>> Yes I see.
>>>
>>> I would justify it this way: gmp-6.0.0 is the first version that does
>>> not invoke undefined behavior in gmp.h, once we update to gmp-6.0.0
>>> we could emit at least a warning in cstddef for this invalid code.
>>>
>>> Once we have gmp-6.0.0, the earliest mpfr version that compiles at all
>>> is mpfr-3.1.1 and the earliest mpc version that compiles at all is
>>> mpc-0.9.  This would be the supported installed versions.
>>>
>>> In-tree gmp-6.0.0 does _not_ work for ARM.  But gmp-6.1.0 does (with a
>>> little quirk).  All supported mpfr and mpc versions are working in-tree
>>> too, even for the ARM target.
>>>
>>> When we have at least mpfr-3.1.1, it is straight forward to remove the
>>> pre-3.1.0 compatibility code from gcc/fortran/simplify.c for instance.
>>>
>>> So I would propose this updated patch for gcc-7.
>>
>> would this version combo (gmp 6.0.0, mpfr 3.1.1, mpc 0.9) also work on
>> the active release branches (gcc-5 and gcc-6, gcc-4.9 is on it's way
>> out)?  Having to install two different sets of the libraries for trunk
>> and branch work would be extremely tedious.
>>
>> 	Rainer
>>
>
> Yes, when they are pre-installed there should be no problem.
> Also newer versions than these seem to work.
>
> In-tree only the versions that download_prerequisite picks are
> tested and guaranteed to work.

I was made aware today that my recent patch for pr49905 broke
bootstrap with MPFR 2.4:

   https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01507.html

In light of this risk and given that the recommended MPFR version
is still 2.4 I wonder if the download_prerequisites script shouldn't
instead download the minimum supported version.  That way those of
us working with MPFR but not intimately familiar with its version
specific details would have an easier way of avoiding such breakage.

Alternatively, perhaps the script could be extended to make it
possible to choose between the most recent and the recommended
versions of the prerequisites that GCC is intended to work with,
and people who make use of either in their code encouraged to
test with both.

Martin

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-09-22 17:32         ` Martin Sebor
@ 2016-09-22 17:45           ` Joseph Myers
  2016-09-22 17:55           ` Bernd Edlinger
  1 sibling, 0 replies; 29+ messages in thread
From: Joseph Myers @ 2016-09-22 17:45 UTC (permalink / raw)
  To: Martin Sebor
  Cc: Bernd Edlinger, Rainer Orth, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Thu, 22 Sep 2016, Martin Sebor wrote:

> In light of this risk and given that the recommended MPFR version
> is still 2.4 I wonder if the download_prerequisites script shouldn't
> instead download the minimum supported version.  That way those of

No, it should download the latest version known to work with the script 
and we should routinely review and update those versions (preferably they 
should be the latest releases of the libraries, subject to avoiding major 
updates while in bug-fixing mode).  We should not encourage use of ancient 
versions, although we should only update the minimum when there's actually 
a new feature we want to use (that feature may just be a convenience 
rather than something hard to avoid, if the minimum version with it is old 
enough).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-09-22 17:32         ` Martin Sebor
  2016-09-22 17:45           ` Joseph Myers
@ 2016-09-22 17:55           ` Bernd Edlinger
  2016-09-22 18:07             ` Joseph Myers
  1 sibling, 1 reply; 29+ messages in thread
From: Bernd Edlinger @ 2016-09-22 17:55 UTC (permalink / raw)
  To: Martin Sebor, Rainer Orth
  Cc: Joseph Myers, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On 09/22/16 19:26, Martin Sebor wrote:
> On 04/27/2016 09:47 AM, Bernd Edlinger wrote:
>>
>>
>> Yes, when they are pre-installed there should be no problem.
>> Also newer versions than these seem to work.
>>
>> In-tree only the versions that download_prerequisite picks are
>> tested and guaranteed to work.
>
> I was made aware today that my recent patch for pr49905 broke
> bootstrap with MPFR 2.4:
>
>    https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01507.html
>
> In light of this risk and given that the recommended MPFR version
> is still 2.4 I wonder if the download_prerequisites script shouldn't
> instead download the minimum supported version.  That way those of
> us working with MPFR but not intimately familiar with its version
> specific details would have an easier way of avoiding such breakage.
>
> Alternatively, perhaps the script could be extended to make it
> possible to choose between the most recent and the recommended
> versions of the prerequisites that GCC is intended to work with,
> and people who make use of either in their code encouraged to
> test with both.
>
> Martin
>


There is no feasible way how to make all gmp/mpfr/mpc versions from
minimal to latest build for all targets and all possible
cross-configurations.

I hope that we do not "recommend" these versions.

They are only the minimum versions for pre-installed packages.



Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-09-22 17:55           ` Bernd Edlinger
@ 2016-09-22 18:07             ` Joseph Myers
  2016-09-22 18:10               ` Richard Biener
  2016-09-22 18:16               ` Bernd Edlinger
  0 siblings, 2 replies; 29+ messages in thread
From: Joseph Myers @ 2016-09-22 18:07 UTC (permalink / raw)
  To: Bernd Edlinger
  Cc: Martin Sebor, Rainer Orth, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On Thu, 22 Sep 2016, Bernd Edlinger wrote:

> There is no feasible way how to make all gmp/mpfr/mpc versions from
> minimal to latest build for all targets and all possible
> cross-configurations.
> 
> I hope that we do not "recommend" these versions.
> 
> They are only the minimum versions for pre-installed packages.

And personally I think it would by now be reasonable to require MPFR 3.0 
or 3.1 as a minimum version should someone wish to make the various 
cleanups mentioned in the April discussion, so avoiding claiming to 
support configurations few developers will be testing.  (MPFR 3.1 came out 
nearly five years ago - 3 Oct 2011.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-09-22 18:07             ` Joseph Myers
@ 2016-09-22 18:10               ` Richard Biener
  2016-09-22 18:16               ` Bernd Edlinger
  1 sibling, 0 replies; 29+ messages in thread
From: Richard Biener @ 2016-09-22 18:10 UTC (permalink / raw)
  To: Joseph Myers, Bernd Edlinger
  Cc: Martin Sebor, Rainer Orth, gcc-patches,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On September 22, 2016 8:00:40 PM GMT+02:00, Joseph Myers <joseph@codesourcery.com> wrote:
>On Thu, 22 Sep 2016, Bernd Edlinger wrote:
>
>> There is no feasible way how to make all gmp/mpfr/mpc versions from
>> minimal to latest build for all targets and all possible
>> cross-configurations.
>> 
>> I hope that we do not "recommend" these versions.
>> 
>> They are only the minimum versions for pre-installed packages.
>
>And personally I think it would by now be reasonable to require MPFR
>3.0 
>or 3.1 as a minimum version should someone wish to make the various 
>cleanups mentioned in the April discussion, so avoiding claiming to 
>support configurations few developers will be testing.  (MPFR 3.1 came
>out 
>nearly five years ago - 3 Oct 2011.)

Hmpf, it will be a hassle to update all our auto-testers again...  So, yes, we are 'testing' with those versions.

Richard.


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [RFC] Update gmp/mpfr/mpc minimum versions
  2016-09-22 18:07             ` Joseph Myers
  2016-09-22 18:10               ` Richard Biener
@ 2016-09-22 18:16               ` Bernd Edlinger
  1 sibling, 0 replies; 29+ messages in thread
From: Bernd Edlinger @ 2016-09-22 18:16 UTC (permalink / raw)
  To: Joseph Myers
  Cc: Martin Sebor, Rainer Orth, gcc-patches, Richard Biener,
	Marc Glisse <marc.glisse@inria.fr>; Jakub Jelinek
	<jakub@redhat.com>; Jonathan Wakely

On 09/22/16 20:00, Joseph Myers wrote:
> On Thu, 22 Sep 2016, Bernd Edlinger wrote:
>
>> There is no feasible way how to make all gmp/mpfr/mpc versions from
>> minimal to latest build for all targets and all possible
>> cross-configurations.
>>
>> I hope that we do not "recommend" these versions.
>>
>> They are only the minimum versions for pre-installed packages.
>
> And personally I think it would by now be reasonable to require MPFR 3.0
> or 3.1 as a minimum version should someone wish to make the various
> cleanups mentioned in the April discussion, so avoiding claiming to
> support configurations few developers will be testing.  (MPFR 3.1 came out
> nearly five years ago - 3 Oct 2011.)
>

Yes, and we have workarounds for more than just convenience features
that are missing in MPFR 2.4.

I proposed to remove them in April but Richard was against it.


Bernd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-09-22 18:10 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 18:23 [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
2016-04-26 18:29 ` Jakub Jelinek
2016-04-26 18:42   ` Bernd Edlinger
2016-04-26 18:39 ` Marc Glisse
2016-04-26 19:01   ` Richard Biener
2016-04-26 19:05   ` Bernd Edlinger
2016-04-26 19:29     ` Marc Glisse
2016-04-27 14:01       ` Bernd Edlinger
2016-04-26 20:15 ` Joseph Myers
2016-04-27 15:31   ` Bernd Edlinger
2016-04-27 15:37     ` Rainer Orth
2016-04-27 15:47       ` Bernd Edlinger
2016-04-29  8:53         ` Rainer Orth
2016-09-22 17:32         ` Martin Sebor
2016-09-22 17:45           ` Joseph Myers
2016-09-22 17:55           ` Bernd Edlinger
2016-09-22 18:07             ` Joseph Myers
2016-09-22 18:10               ` Richard Biener
2016-09-22 18:16               ` Bernd Edlinger
2016-04-28  7:09     ` Richard Biener
     [not found]       ` <AM4PR07MB157126273516C6B5E78F4052E4650@AM4PR07MB1571.eurprd07.prod.outlook.com>
2016-04-28 12:35         ` [PATCH] Update gmp/mpfr/mpc in-tree versions Richard Biener
2016-04-28 14:22           ` Bernd Edlinger
2016-04-28 14:30             ` Richard Biener
2016-04-28 16:25               ` Bernd Edlinger
2016-04-29  7:46                 ` Richard Biener
2016-04-29 13:26                   ` Bernd Edlinger
2016-05-02  6:50                     ` Richard Biener
2016-05-03 20:05       ` [RFC] Update gmp/mpfr/mpc minimum versions Bernd Edlinger
2016-05-04  7:46         ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).