Re: #include "gmp.h" in system.h via gcc-plugin.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 20, 2015 at 1:33 PM, Basile Starynkevitch
<basile@xxxxxxxxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux