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: [PLUGINS] Add 'extern "C"' wrappers to several header files


On Wed, Jul 22, 2009 at 11:23 AM, Duncan Sands<baldrick@free.fr> wrote:
> Hi Gabriel,
>
>> ?(2) identify a well-defined interface to your plugin, e.g. the entry
>> points
>> ? ? ? and declare them with the C calling convention; and code the
>> internals
>> ? ? ? of your plugin in C++
>
> the problem isn't the entry points into the plugin, the problem is the
> entry points into gcc. ?The plugin is converting gimple to LLVM IR, and
> as such it accesses many many gcc routines. ?While I could write my own
> headers redeclaring all the gcc stuff with the C calling convention, I'd
> rather not because it would be a lot of work and fragile.

In that case, what you want is to have a well defined list of entry
points into the
compiler, as opposed to a mass convertion to C calling convention.

>
> Ciao,
>
> Duncan.
>


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