This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Fix PR 39739, Bootstrapping with in-tree mpfr-2.4.1 and --with-gmp=... errors


This patch fixes PR bootstrap/39739, an error occuring when bootstrapping
GCC with mpfr-2.4.1 built in-tree and specifying a directory to find an
existing gmp installation.  (The bug is latent when using earlier mpfr
releases).  When using mpfr-2.4.1, the bug results in a hard error from
configure in the in-tree mpfr directory.

The bug occurs on all active branches.  The details and analysis can be
found in this thread: http://gcc.gnu.org/ml/gcc/2009-04/msg00342.html

Tested on mainline on x86_64-unknown-linux-gnu via C-only
--disable-bootstrap configure and make with all four combinations of
in-tree/out-tree gmp/mpfr. I also did a full bootstrap/regtest with both
gmp/mpfr in-tree.

Okay for 4.3, 4.4 and mainline?

		Thanks,
		--Kaveh


2009-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	PR bootstrap/39739
	* configure.ac (extra_mpfr_configure_flags): Set and AC_SUBST.
	* Makefile.def (module=mpfr): Use extra_mpfr_configure_flags.

	* configure, Makefile.in: Regenerate.

diff -rup orig/egcc-SVN20090411/configure.ac egcc-SVN20090411/configure.ac
--- orig/egcc-SVN20090411/configure.ac	2009-04-10 02:02:31.000000000 +0200
+++ egcc-SVN20090411/configure.ac	2009-04-11 04:51:41.000000000 +0200
@@ -1250,6 +1250,7 @@ fi
 if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
   gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
+  extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp'
   # Do not test the gmp 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
@@ -1314,6 +1315,7 @@ fi
 # Flags needed for both GMP and/or MPFR
 AC_SUBST(gmplibs)
 AC_SUBST(gmpinc)
+AC_SUBST(extra_mpfr_configure_flags)

 # Allow host libstdc++ to be specified for static linking with PPL.
 AC_ARG_WITH(host-libstdcxx, [  --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
diff -rup orig/egcc-SVN20090411/Makefile.def egcc-SVN20090411/Makefile.def
--- orig/egcc-SVN20090411/Makefile.def	2009-04-02 02:00:43.000000000 +0200
+++ egcc-SVN20090411/Makefile.def	2009-04-11 04:51:12.000000000 +0200
@@ -65,7 +65,7 @@ host_modules= { module= gmp; lib_path=.l
 	        host="none-${host_vendor}-${host_os}";
 		target="none-${host_vendor}-${host_os}"; };
 host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
-		extra_configure_flags='--disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp';
+		extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
 		no_install= true;
 	        host="none-${host_vendor}-${host_os}";
 		target="none-${host_vendor}-${host_os}"; };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]