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: RFC: Treat plugins as first class citizens


On Mon, Mar 13, 2017 at 6:12 PM, Nick Clifton <nickc@redhat.com> wrote:
> Hi Guys,
>
>  I was thinking that it would be nice to make plugins a "first-class
>  citizen" in the gcc world by having a proper directory structure and
>  integration into the rest of gcc.  For example:
>
>     gcc/plugins               <-- Everything plugin-y starts here
>     gcc/plugins/Make-lang.in  <-- Makefile fragment.
>     gcc/plugins/src           <-- Maybe move gcc/plugins.[c|h|def] here ?
>     gcc/plugins/doc           <-- Actual documentation, wow!
>     gcc/plugins/testsuite     <-- Tests for the plugins and their integration into gcc
>     gcc/plugins/config        <-- Subdirectories of this directory contain each real plugin
>     gcc/plugins/config/annobin  <-- For example, this is where my pet plugin would go
>
>   Plus there could be an official plugins maintainer.  (I am willing to
>   volunteer, so is Aldy Hernandez).  The documentation would be compiled
>   along with the rest of gcc's documentation and the testsuite would be
>   run as part of gcc's normal testing process.  Ideally I would also
>   like to see plugin test failures be considered as blockers for new
>   releases, but that is something for the future.
>
>   So, what do you think ?  Should I create a patch and submit it for
>   official review ?

I believe plugins are currently a hack due to the lack of a clearly defined
API to access GCC internals.  Unless that is resolved somehow, see various
half-way finished patch prototypes from two (or three?) years ago treating
them as "first class" would be a blatant labeling lie.  It's at most
"first class mess".

The most obvious "proof" of the broken current state is that plugins are broken
all the time because at make install time we forget to install another
of the GCC
internal headers.  The bug is of course that we need those at all.

I'm still convinced that 99% of all (valid) plugin uses involve only
introspection
or well-defined instrumentation.

Richard.

> Cheers
>   Nick


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