This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 35051: Build (as opposed to host) machine needs GMP and MPFR
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Richard Sandiford <rsandifo at nildram dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 2 Feb 2008 18:48:01 -0500 (EST)
- Subject: Re: PR 35051: Build (as opposed to host) machine needs GMP and MPFR
- References: <87abmjsnzt.fsf@firetop.home>
On Sat, 2 Feb 2008, Richard Sandiford wrote:
> If you build a cross-host compiler (such as a mips64-linux-gnu native
> compiler from x86_64-linux-gnu), --with-gmp and --with-mpfr rightly
> apply to the host. However, even the generator files include <gmp.h>
> and <mpfr.h>, so the build machine needs gmp.h and mpfr.h to be
> installed too. There's no real need for this and, as --with-gmp and
> --with-mpfr show, we can't assume that the files are installed in the
> standard directories.
>
> This patch takes the simple approach of guarding GMP and MPFR stuff
> with !GENERATOR_FILE.
I think your patch looks fine, no need to move the includes IMHO.
On a related note, there's a minor gnit in that the gmp/mpfr libraries are
linked into too many of our host programs. E.g. xgcc doesn't need to link
with them, but it does. If you used shared libs you needlessly have these
.so files linked into your binary.
Only things like cc1 or cc1plus that link with libbackend.a need these
libraries. I could fix thbis, but I'm not sure if we care.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu