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]

Re: PR 35051: Build (as opposed to host) machine needs GMP and MPFR


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


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