RFA/RFC: Adding support for gmp and mpfr sources in the build tree

Kaveh R. GHAZI ghazi@caip.rutgers.edu
Sat Dec 2 03:46:00 GMT 2006


On Mon, 27 Nov 2006, Paolo Bonzini wrote:

> 2006-11-27  Paolo Bonzini  <bonzini@gnu.org>
>
> 	* configure.in (build_configargs, host_configargs, target_configargs):
> 	Remove build/host/target parameters.
> 	(host_libs): Add gmp and mpfr.
> 	(GMP tests): Reorganize to allow in-tree GMP/MPFR.
> 	* Makefile.def (build fixincludes): Remove useless extra_configure_args.
> 	(gmp, mpfr): New.
> 	(gcc): Rename target to all_target.
> 	* Makefile.tpl (build_os, build_vendor, host_os, host_vendor,
> 	target_os, target_vendor): New.
> 	(configure): Add host_alias/target_alias arguments.  Adjust invocations.
> 	* Makefile.in: Regenerate.
>
> Index: configure.in
> ===================================================================
> --- configure.in	(revision 119247)
> +++ configure.in	(working copy)
> @@ -1052,9 +1052,10 @@ ACX_PROG_GNAT
> -gmplibs="-lmpfr"
> +gmplibs="-lgmp -lmpfr"


Hi Paolo,

I had a couple of comments on your patch.  First is I think you need to
swap the order of the libs above.  If you build on a platform that only
has static libraries, then mpfr needs to be first so it pulls in the
necessary functions from gmp.

That brings up a second issue, which is I think there should be a way to
say --{enable,disable}-{shared,static}-{gmp,mpfr} to the top level
configure, and this should pass the appropriate
--{enable,disable}-{shared,static} into the gmp and/or mpfr subdirs.

Third, I think you need gmp to finish building before you configure mpfr
because gmp.h gets created on the fly.  It probably works for you because
you did a serial make.  If you run in parallel, then as I recall it'll
choke.  Try this in Makefile.def:

+// mpfr configure depends on gmp being configured and built.
+dependencies = { module=configure-mpfr; on=all-gmp; hard=true; };

I had to add this dependency in my attempt here:
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00416.html

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list