From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109081 invoked by alias); 14 Mar 2017 08:20:03 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 109055 invoked by uid 89); 14 Mar 2017 08:20:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1964, H*i:sk:87vardg, H*f:sk:87vardg, citizens X-HELO: mail-ot0-f172.google.com Received: from mail-ot0-f172.google.com (HELO mail-ot0-f172.google.com) (74.125.82.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Mar 2017 08:20:01 +0000 Received: by mail-ot0-f172.google.com with SMTP id o24so128264561otb.1 for ; Tue, 14 Mar 2017 01:20:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eNIx5q6gN+s4z3XpPeag+wxBcDWftEjnRrco9TyyFWo=; b=fO5Qn2YDQdoVKGoJ7VlNjVZ/kClGrur7fAaPcUFGVwZqKySq1rbIcmgl+YbK/fb6EE BN3zd0j3jfplH1RUWmeUyS/yiVMQnS4qhyXkv3YlJWXCeCfM4yA+GrQtYgvJ+X2hUXoi DrK1OCl+9RTKnMmz3mL0RKjHgdKoLthROYRUu35NQjHfsZzHfJghpo7X3PpN111B4L0x jcNtT/M1KQlb966khL8A+DPVq5wpM5Ucb/dzkBEILzO0D9PEKM6gAukCsnpJaQcBhaee aNU4ZhCV5UAYY/0tk4VPbHeurCa/9m6h8tc10kwe0p2AFzmfOogMKeYJNIN4StcaKJTJ uGDg== X-Gm-Message-State: AFeK/H2D+49BILoD28L8lwYJHbF7AAd4V6L3KAVswKVgRyvJrhxyavNlkoRumGGqJMYnDjL2RPo9WmYviWdyAQ== X-Received: by 10.157.16.97 with SMTP id o30mr18245714oto.175.1489479600167; Tue, 14 Mar 2017 01:20:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.21.25 with HTTP; Tue, 14 Mar 2017 01:19:59 -0700 (PDT) In-Reply-To: <87vardgkxe.fsf@redhat.com> References: <87vardgkxe.fsf@redhat.com> From: Richard Biener Date: Tue, 14 Mar 2017 08:20:00 -0000 Message-ID: Subject: Re: RFC: Treat plugins as first class citizens To: Nick Clifton Cc: GCC Development Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00065.txt.bz2 On Mon, Mar 13, 2017 at 6:12 PM, Nick Clifton 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