"Kaveh R. GHAZI" <gh...@caip.rutgers.edu> writes:

> On Fri, 10 Apr 2009, Ian Lance Taylor wrote:
>
>> Add a new shell variable in configure.ac extra_mpfr_configure_args.  Set
>> it to what you want to pass to the mpfr configure.  Call
>> AC_SUBST(extra_mpfr_configure_args).  In Makefile.in add a line
>> EXTRA_MPFR_CONFIGURE_ARGS = @extra_mpfr_configure_a...@.  In
>> Makefile.def change the host_modules entry for module=mpfr to replace
>> --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp with
>> $(EXTRA_MPFR_CONFIGURE_ARGS).  Run autoconf and autogen.
>>
>> Easy as cake.
>
> Ah, but cake is only easy when someone else bakes it. :-)
>
>
> Anyway, thanks for the laser-like specific answer, that was extremely
> helpful.  I'm testing a patch, but I have two notes to run by you.
>
> 1.  You mentioned adding EXTRA_MPFR_CONFIGURE_ARGS to Makefile.in.  (I
> think you mean Makefile.tpl, cause Makefile.in is generated?)

Yes, Makefile.tpl, sorry.  I was thinking that but evidently my fingers
typed Makefile.in.

> Anyway, I
> managed to avoid adding the intermediate make variable and just put
> @extra_mpfr_configure_args@ in the module=mpfr entry and it worked.  Is
> there some stylistic or syntactic reason to use the intermediate variable?
> It doesn't seem to be done 100% consistently.

You're right, it's not consistent.  My personal preference is to use a
make variable because it gives a clear place for people to override from
the make command line.  But for an obscure item like this it's not a big
deal.


> 2.  In my previous message I said that mpfr worked by chance and the bug
> was latent but the situation fragile.  That is true for mpfr-2.3.2.
> However the mpfr-2.4.1 tarball hard-errors on a double --with-gmp*,
> apparently by design.  E.g. this is from building an unpatched gcc with
> in-tree mpfr-2.4.1 plus the configure flag --with-gmp=/opt/...
>
>  > configure: error: Do not use --with-gmp-build and other --with-gmp options 
> simultaneously.
>  > See `config.log' for more details.
>  > make[1]: *** [configure-mpfr] Error 1
>
> So IMHO when I finish testing we should install the patch on all active
> branches to forestall any issues when people upgrade to the later mpfr
> releases.

Sounds good to me.

Ian

Reply via email to