This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add GPL compatibility check for plugins


Diego Novillo wrote:
On request from the FSF, I am adding this check.

When a plugin is loaded, the compiler checks whether the symbol
plugin_is_GPL_compatible exists in the loaded shared object.

The presence of this symbol asserts that the loaded plugin has
been licenced under a GPL-compatible license.  If the symbol does
not exist, the compiler exits with the message:

fatal error: plugin <name> is not licensed under a GPL-compatible license
Well, that please the FSF, but I never really understood that kind of technical stuff. IIRC, the Linux kernel has something similar.
(and the point is that it is technically possible to violate the GPL licence in a plugin; of course it is illegal but IIRC some Linux modules violated the spirit of the GPL licence by being a GPL almost empty wrapper around a proprietary binary. Such things could also happen with GCC plugins; this is a legal issue, not a technical one). Very broadly, I am not naive enough to believe in technical means against unethical or illegal behavior (see the recent HADOPI law in France as a counterexample, and the decision of French "conseil constitionnel"). But I don't want to discuss that here...


What I would suggest in addition of the patch is to document, in the plugins.texi file and one the gcc.gnu.org website, that plugins are expected to be GPLv3 compatible.

And I believe (as I heard at the summit a year ago), that the practical best protection against proprietary plugins is the lack of a stable GCC internal API.

My main point is of course not discussing the FSF request (they own GCC so could do whatever they want, and very probably the US legal system wants more such devices). My point is that the GPL requirement for plugins should be widely documented, and notably (for honest developers) on the gcc.gnu.org website -at the same place announcing plugin functionality- and inside plugins.texi. These are the places any developer would read first (much before reading the GCC runtime exception licence).

Perhaps Diego might add something like:

"GCC plugins should be free software with a GPL-compatible license".

(I am neither north american nor native English speaker, so the wording might be wrong - perhaps "are required to" instead of "should").


as the first sentence of the @subsection Plugin license check, or perhaps even near the beginning of the entire Plugins @chapter.


Maybe I don't understand English language, or US law system, subtleties.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]