From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: GCC Mailing List <gcc@gcc.gnu.org>
Subject: plugins directory?
Date: Mon, 22 Jun 2009 11:20:00 -0000 [thread overview]
Message-ID: <4A3F6910.8080902@starynkevitch.net> (raw)
Hello All,
This is a discussion complementing
http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01587.html. So plugins here
means GPLv3 licensed GCC plugins.
First, I believe that progressively, there will be some plugins
dedicated to the compilation of some major specific free software,
mostly for application specific warnings.
For example, it could happen that the Linux kernel community, or KDE/QT
community, or Gnome/GTK community, or Apache community will
progressively develop plugins to help their development. BTW, the
treehydra effort from Mozilla (that is Taras Glek) is illustrative of my
intuition.
I am alone in having this belief (that application specific GCC plugins
would appear, mostly for static analysis or better diagnostic purposes,
not for code generation.)?
If that will happen, most of the plugins will indeed be GCC version
specific (so a gcckde plugin binary -the gcckde-4.7.2.so file- would
indeed be specific to gcc 4.7.2; the same plugin for gcc 4.7.3 would
indeed need a recompilation at least).
I am supposing a user of some -e.g. Linux- distribution which happens to
package commonly used application specific GCC plugins that the user
already installed.. Let's suppose the user is developing a KDE
application. He wants the KDE/QT plugin to check some stuff about his code.
First, I believe that this user does not want to change his makefile
when gcc bumps from 4.7.2 to 4.7.3. As a concrete example, as a
Debian/Sid=Unstable user, I never had to change a Makefile because gcc
bumped from 4.3.2 to 4.3.3. I believe this is practically very important
for plugins to be used (and for application specific plugins to flourish).
So, what is the Makefile that such user would use? It definitely cannot
contain a hardcoded plugin path like e.g.
CXXFLAGS=-fplugin=/usr/lib/gcc/4.7.2/plugins/kdegcc.so -O
At the very least, the hardcoded plugin path should be somehow computed,
e.g.
CXXFLAGS= -fplugin=$(shell pkg-config -gccplugin kde) -O
Alternatively, one could some Debian package would offer a gcc-for-kde
command (probably a shell script) to compile KDE applications.
However, we could suppose that some computation (to find where & which
exact kdegcc.so is loaded) is done by GCC. Concretely, I was thinking of
CXXFLAGS= -fplugin=kdegcc -O
and then we should provide some machinery to find the kdegcc.so plugin
at the appropriate place. BTW, this already happens in GCC for other
stuff: the gcc driver does find and manage the cc1 executable!
I would prefer some discussion to happen, instead of blindly proposing
patches on gcc-patches@ and have them rejected until I find a consensus.
Do you think that
1. We should not care about where system wide plugins are located, and
leave the -fplugin command as it is.
2. We should have a path of GCC plugins, i.e. a sequence of directories
where plugins are searched.
a. should this path be setable only by a -fplugin-path option
b. should this path be also settable thru e.g. an environment variable
like GCC_PLUGINS_PATH
c. what is the default value of this path
Notice that dlopen already uses LD_LIBRARY_PATH, but I feel it is not
entirely appropriate for our purposes (because plugins are not
libraries, even if they share the .so ...).
I think we should reach a consesus quickly: the stage 1 is closing soon,
and such a patch has to happen very soon!
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 reply other threads:[~2009-06-22 11:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 11:20 Basile STARYNKEVITCH [this message]
2009-06-22 11:35 ` Richard Guenther
2009-06-23 5:48 ` Basile STARYNKEVITCH
2009-06-24 15:35 ` Diego Novillo
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=4A3F6910.8080902@starynkevitch.net \
--to=basile@starynkevitch.net \
--cc=gcc@gcc.gnu.org \
/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).