This is the mail archive of the
mailing list for the GCC project.
Re: #include "gmp.h" in system.h via gcc-plugin.h
- From: Bert Wesarg <bert dot wesarg at googlemail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, Markus Geimer <m dot geimer at fz-juelich dot de>, David Malcolm <dmalcolm at redhat dot com>, Ludovic CourtÃs <ludovic dot courtes at inria dot fr>, Basile Starynkevitch <basile at starynkevitch dot net>
- Date: Thu, 26 Feb 2015 16:34:39 +0100
- Subject: Re: #include "gmp.h" in system.h via gcc-plugin.h
- Authentication-results: sourceware.org; auth=none
- References: <CAKPyHN17Dvbr-xKwDZQoYWz+iP435VMFb1bOjjtZkcwsbkxWbg at mail dot gmail dot com> <CAKPyHN2QOk2haPEfYhu8vXXg1+JxgRLFCK3AXuhJdtNGxBTafg at mail dot gmail dot com> <20150220123350 dot GA24581 at ovh dot starynkevitch dot net> <CAKPyHN2hBrsbV+ipd3q3_FCVomkXFQS1rZO59vwfmAEwFV-Lyw at mail dot gmail dot com>
[ Sending to gcc@, in the hope to get a statement from the GCC
developers finally. ]
On Fri, Feb 20, 2015 at 2:35 PM, Bert Wesarg <firstname.lastname@example.org> wrote:
> On Fri, Feb 20, 2015 at 1:33 PM, Basile Starynkevitch
> <email@example.com> wrote:
>> On Fri, Feb 20, 2015 at 09:25:30AM +0100, Bert Wesarg wrote:
>>> [ Cc'ing all known plug-in authors. ]
>>> Guys, are you aware of this gmp.h dependency and by chance how are you
>>> dealing with it?
>> In pratice, I just install the gcc-4.9-plugin-dev package on my Debian
>> (and also all the packages required to *build* gcc-4.9).
> Sure, that probably covers 90% of the usages, and I also checked that
> the gcc-4.9-plugin-dev package also requires libgmp-dev. So for this
> case everything seems good.
>> You probably need to have a gmp library very close to the one
>> linked into your compiler. If that is an issue, you'll need to recompile
>> GCC from its source code.
> And this is the real problem. Building GCC from source wither with
> ---with-gmp or with an embeded gmp source renders the installed
> plug-in headers useless. This may only be a fraction of all users who
> will build a plug-in against GCC, but leaving them out should not be
> an option.
> I could successfully build a plug-in by providing this fake gmp.h
> header as an fallback:
> #ifndef FAKE_GMP_H
> #define FAKE_GMP_H
> typedef void* mpz_t;
> But honestly, this looks so bad, that I'm reluctant to accept this as
> an work around, for people who build their GCC with --with-gmp or with
> an embedded gmp.
>> Good luck!
>> (it is a bit sad that there are so few GCC plugin developers)