This is the mail archive of the 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: gcc extensibility

On 03/29/2012 05:52 PM, Basile Starynkevitch wrote:

> On Thu, 29 Mar 2012 11:42:30 -0500
> Gabriel Dos Reis <> wrote:
>> I suspect that if plugins people want to make progress on this
>> recurring theme, they
>> will have to come up with a specification and an API.  Otherwise, they have only
>> themselves to blame if their plugins break from release to release.
> They blame nobody if their plugins break from one release to the next. They take this
> incompatibility of GCC as part of their plugins developer's work.
> Again, a plugin writer by definition uses whatever interface is given to him.

IMO, the right way to approach this is instead:

#1 - I, a so called "plugin writer", have this use I could give to GCC,
 but it wouldn't make sense to include that code in the GCC sources/executable
 itself.  In fact, the maintainers would reject it, rightly.

#2 - However, if I could just add a little bit of glue interface to GCC
 that exposes just enough GCC internal bits that I could write my plugin
 against, in a way that is not invasive to the rest of the compiler,
 I know that would be accepted by the maintainers.  It's a compromise the
 GCC maintainers are willing to make.  They are aware that there's potential
 for other people to come up with other uses for the same minimal interfaces,
 so they accept this.  In the future, it's likely that other plugin authors
 will be satisfied by the interfaces I and other previous plugin authors have
 already added to GCC by then.

But, note it's clearly the plugin author that needs to write #2.  #1 too, obviously.  :-)

Pedro Alves

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