Mercurial > hg > CbC > CbC_gcc
diff gcc/doc/plugins.texi @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
line wrap: on
line diff
--- a/gcc/doc/plugins.texi Tue May 25 18:58:51 2010 +0900 +++ b/gcc/doc/plugins.texi Tue Mar 22 17:18:12 2011 +0900 @@ -16,16 +16,16 @@ Plugins are loaded with -@option{-fplugin=/path/to/NAME.so} @option{-fplugin-arg-NAME-<key1>[=<value1>]} +@option{-fplugin=/path/to/@var{name}.so} @option{-fplugin-arg-@var{name}-@var{key1}[=@var{value1}]} The plugin arguments are parsed by GCC and passed to respective plugins as key-value pairs. Multiple plugins can be invoked by specifying multiple @option{-fplugin} arguments. A plugin can be simply given by its short name (no dots or -slashes). When simply passing @option{-fplugin=NAME}, the plugin is -loaded from the @file{plugin} directory, so @option{-fplugin=NAME} is -the same as @option{-fplugin=`gcc -print-file-name=plugin`/NAME.so}, +slashes). When simply passing @option{-fplugin=@var{name}}, the plugin is +loaded from the @file{plugin} directory, so @option{-fplugin=@var{name}} is +the same as @option{-fplugin=`gcc -print-file-name=plugin`/@var{name}.so}, using backquote shell syntax to query the @file{plugin} directory. @section Plugin API @@ -45,13 +45,15 @@ and exit with the error message: @smallexample -fatal error: plugin <name> is not licensed under a GPL-compatible license -<name>: undefined symbol: plugin_is_GPL_compatible +fatal error: plugin @var{name} is not licensed under a GPL-compatible license +@var{name}: undefined symbol: plugin_is_GPL_compatible compilation terminated @end smallexample -The type of the symbol is irrelevant. The compiler merely asserts that -it exists in the global scope. Something like this is enough: +The declared type of the symbol should be int, to match a forward declaration +in @file{gcc-plugin.h} that suppresses C++ mangling. It does not need to be in +any allocated section, though. The compiler merely asserts that +the symbol exists in the global scope. Something like this is enough: @smallexample int plugin_is_GPL_compatible;