This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Treat plugins as first class citizens
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 14 Mar 2017 09:19:59 +0100
- Subject: Re: RFC: Treat plugins as first class citizens
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On Mon, Mar 13, 2017 at 6:12 PM, Nick Clifton <firstname.lastname@example.org> 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
or well-defined instrumentation.