public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* plugins & howto & generators
@ 2009-05-27 17:31 Basile STARYNKEVITCH
  2009-05-27 17:58 ` Manuel López-Ibáñez
  0 siblings, 1 reply; 4+ messages in thread
From: Basile STARYNKEVITCH @ 2009-05-27 17:31 UTC (permalink / raw)
  To: GCC Mailing List

Hello All,

We now have plugins and they are somehow documented. 
http://gcc.gnu.org/onlinedocs/gccint/Plugins.html

Perhaps we might document how to build a plugin? (Or should we not bother?)

In particular, I am not entirely sure to understand plugin from a 
"purely" user perspective, for instance the Debian/Sid user in 2010 who 
did install the hypothetical gcc-4.5 & gcc-4.5-dev debian packages 
(which do not exist today AFAIK).

I am specifically thinking of future users who do not compile GCC from 
its source. Those who do compile GCC are able to compile the plugins, 
since we have testcases for that, showing them how to make plugins.

Should we tell them (the other users using the future gcc-4.5-dev Debian 
package) in our documentation how to build a plugin (I mean what are the 
actual commands to run, what kind of Makefile for them, what are the 
required CFLAGS or -I... path, etc..), or should that be left to e.g. 
linux distribution packagers?
 
In addition, I tend to believe that some of the generators currently 
used inside GCC, (i.e. the gen* executables in the gcc/build directory 
of the build tree) could be useful to some (not all) expert plugin 
developers.

In particular, one could imagine that a future version of gengtype (not 
the one currently in the trunk rev.147912) could be enhenced to be 
useable by plugin developers. I am specifically thinking of adding a 
mode to run it for plugins using the  PLUGIN_REGISTER_GGC_ROOTS 
pseudo-event.

I am considering enhancing the gengtype tool so that
  gengtype --plugin yourplugin.c gt-yourplugin.h
would generate the gt-yourplugin.h neede in yourplugin.c

Comments are welcome.

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} ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: plugins & howto & generators
  2009-05-27 17:31 plugins & howto & generators Basile STARYNKEVITCH
@ 2009-05-27 17:58 ` Manuel López-Ibáñez
  2009-05-28  4:53   ` Dave Korn
  2009-05-28 23:04   ` Joseph S. Myers
  0 siblings, 2 replies; 4+ messages in thread
From: Manuel López-Ibáñez @ 2009-05-27 17:58 UTC (permalink / raw)
  To: Basile STARYNKEVITCH; +Cc: GCC Mailing List

2009/5/27 Basile STARYNKEVITCH <basile@starynkevitch.net>:
> Hello All,
>
> We now have plugins and they are somehow documented.
> http://gcc.gnu.org/onlinedocs/gccint/Plugins.html
>
> Perhaps we might document how to build a plugin? (Or should we not bother?)

In particular, in the wiki, it is better to err on the side of too
much documentation. If someone can be bothered, then it is probably
useful.

> Should we tell them (the other users using the future gcc-4.5-dev Debian
> package) in our documentation how to build a plugin (I mean what are the
> actual commands to run, what kind of Makefile for them, what are the
> required CFLAGS or -I... path, etc..), or should that be left to e.g. linux
> distribution packagers?

A complete tutorial on how to create and build a generic plugin is
perhaps more suited for the wiki than for the internals documentation.
Plugin authors should describe how to build their plugins, which may
require special flags or commands. Popular plugins will probably be
built (and packaged) by distributions.

Cheers,

Manuel.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: plugins & howto & generators
  2009-05-27 17:58 ` Manuel López-Ibáñez
@ 2009-05-28  4:53   ` Dave Korn
  2009-05-28 23:04   ` Joseph S. Myers
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Korn @ 2009-05-28  4:53 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: Basile STARYNKEVITCH, GCC Mailing List

Manuel López-Ibáñez wrote:
> 2009/5/27 Basile STARYNKEVITCH <basile@starynkevitch.net>:

>> Should we tell them (the other users using the future gcc-4.5-dev Debian
>> package) in our documentation how to build a plugin (I mean what are the
>> actual commands to run, what kind of Makefile for them, what are the
>> required CFLAGS or -I... path, etc..), or should that be left to e.g. linux
>> distribution packagers?
> 
> A complete tutorial on how to create and build a generic plugin is
> perhaps more suited for the wiki than for the internals documentation.

  But something along the lines of this:

http://gcc.gnu.org/onlinedocs/gccint/Front-End.html
http://gcc.gnu.org/onlinedocs/gccint/Front-End-Directory.html

... level of detail might be appropriate, no?  A simple checklist to get
people started.

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: plugins & howto & generators
  2009-05-27 17:58 ` Manuel López-Ibáñez
  2009-05-28  4:53   ` Dave Korn
@ 2009-05-28 23:04   ` Joseph S. Myers
  1 sibling, 0 replies; 4+ messages in thread
From: Joseph S. Myers @ 2009-05-28 23:04 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: Basile STARYNKEVITCH, GCC Mailing List

[-- Attachment #1: Type: TEXT/PLAIN, Size: 874 bytes --]

On Wed, 27 May 2009, Manuel López-Ibáñez wrote:

> > Should we tell them (the other users using the future gcc-4.5-dev Debian
> > package) in our documentation how to build a plugin (I mean what are the
> > actual commands to run, what kind of Makefile for them, what are the
> > required CFLAGS or -I... path, etc..), or should that be left to e.g. linux
> > distribution packagers?
> 
> A complete tutorial on how to create and build a generic plugin is
> perhaps more suited for the wiki than for the internals documentation.

However, sufficient documentation for building plugins should be included 
in the GCC sources so that it is branched with GCC, since it is likely 
there will be significant differences between GCC versions and so each GCC 
branch should include the associated plugin documentation.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-28 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-27 17:31 plugins & howto & generators Basile STARYNKEVITCH
2009-05-27 17:58 ` Manuel López-Ibáñez
2009-05-28  4:53   ` Dave Korn
2009-05-28 23:04   ` Joseph S. Myers

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).