This is the mail archive of the gcc@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: #include "gmp.h" in system.h via gcc-plugin.h


[ 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 <bert.wesarg@googlemail.com> wrote:
> On Fri, Feb 20, 2015 at 1:33 PM, Basile Starynkevitch
> <basile@starynkevitch.net> 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;
>
> #endif
> }}}
>
> 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.
>
> Bert
>
>>
>> Good luck!
>>
>> (it is a bit sad that there are so few GCC plugin developers)
>>
>> Cheers.


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