From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Paolo Bonzini <bonzini@gnu.org>,
Diego Novillo <dnovillo@google.com>,
Olatunji Ruwase <tjruwase@google.com>,
gcc@gcc.gnu.org
Subject: Re: [plugin] Directory for plugins distributed with gcc
Date: Wed, 15 Jul 2009 21:16:00 -0000 [thread overview]
Message-ID: <4A5E4741.3080106@starynkevitch.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0907152045210.25214@digraph.polyomino.org.uk>
Joseph S. Myers wrote:
> On Wed, 15 Jul 2009, Paolo Bonzini wrote:
>
>
>> On 07/15/2009 09:36 PM, Joseph S. Myers wrote:
>>
>>> Before moving something out to a plugin (if we think that is technically
>>> appropriate for the particular code in question) we should have a way to
>>> build code, set up to be built as a plugin, into the compiler so that the
>>> -fplugin options find the built-in code, in a way that does not depend on
>>> plugins otherwise being supported on the host system; maybe somewhere in
>>> the source tree to put sources for plugins that get built into the
>>> compiler, or a configure option to point to such sources.
>
> Unless libltdl can be statically linked in, using it is a bad idea for
> other reasons as previously discussed at length.
>
>
I am aware of these reasons (but I am not sure to agree with them;
however, that is not my point here) against libltdl.
A possible trick would be to decide a convention, such as a plugin whose
name starts with a dot, or contains a slash, is in fact a "builtin"
plugin, always available (and its code is part of GCC core). Actually,
there is a reason to do so, if some GCC code wants to use some plugin
facility. For instance, the MELT branch, even when compiled as a branch
(i.e. without being compiled as a plugin), does call register_callback
internally. And currently, code can call register_callback without any
plugin being actually loaded in. There is no check on the plugin name
argument to register_callback.
Such a convention (on builtin plugins) does not need to be implemented
by code. It could be just agreed upon and suitably documented.
A side effect of this would be perhaps to limit extra GCC -f... program
flags, since we could make them as plugin flags to builtin plugins.
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
next prev parent reply other threads:[~2009-07-15 21:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fe7fd8170907151130j35ac3348kb447e7e1d273d9af@mail.gmail.com>
2009-07-15 18:43 ` Diego Novillo
2009-07-15 18:51 ` Olatunji Ruwase
2009-07-15 19:14 ` Diego Novillo
2009-07-15 19:36 ` Joseph S. Myers
2009-07-15 20:43 ` Paolo Bonzini
2009-07-15 20:53 ` Joseph S. Myers
2009-07-15 21:16 ` Basile STARYNKEVITCH [this message]
2009-07-15 21:43 ` Paolo Bonzini
2009-07-16 13:09 ` Rafael Espindola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A5E4741.3080106@starynkevitch.net \
--to=basile@starynkevitch.net \
--cc=bonzini@gnu.org \
--cc=dnovillo@google.com \
--cc=gcc@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=tjruwase@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).