[GCC-XML] Function bodies

Andreas Degert ad at papyrus-gmbh.de
Tue Jan 31 05:24:03 EST 2006


On Tue, 31 Jan 2006 00:02:05 +0100
"Daniel J. Lauk" <dj at djlauk.de> wrote:

> Am Montag, 30. Januar 2006 21:42 schrieb Brad King:
> > With function bodies contained in the output pretty much all the
> > information in the translation unit is available, and the format
> > looks alot like GCC's internal representation.  Information beyond
> > that available in the original code, such as function overload
> > resolution following C++ rules, has been added by GCC's code.  This
> > could be considered a linking layer.

The GPL license applies to a program (called "work" in the GPL). The
license also applies to all translations of the program into
other programming languages, and to works derived from the
program.

When the program generates output data from input data, the output data
might be governed by the license of the input data (especially if
reproduces the input data in another form, like a translation), but as
long as no substantial parts of the program are copied into the
output its not governed by the license of the program. This is not
about program structure, interface or other general ideas (we are not
talking patent law), but the program code. There don't seem to be any
source code of gccxml (in direct or translated form) in the output of
gccxml, so I don't see a problem here.

The problem arises with the notion "derived work". If you write a
program that depends on internals of gccxml and which cannot be used
independently, it could classify as a derived work of gccxml (which is
a derived work of gcc).

Properties which could make your program a derived work:

 - complex data format
 - data format tied to the internals of gccxml
 - is only useful in combination with gccxml

Properties which would make your program an independent work:

 - simple format, easily produced by other programs
 - there is some other compiler which produces output of the same format
 - data format has a specification which is independent of gccxml

> To anybody on this list, who has legal expertise, please drop me a
> note on the following.

IANAL...

> What's really important to me: At which level of indirection would
> the GPL not be applicable?
> 1) Would my code have to be GPLed?

It has at least to be compatible with the GPL, because gcc-xml has to be
released under GPL. If you want to use your code also in other
projects, you can also publish it under multiple licenses.

> 2) Would code, that processes the body dump, have to be GPLed?

if the data format ties that code strongly to gccxml (e.g., if its
like writing a plugin for a GPL'ed program), I'd say yes.

> 3) Would code, that is being dumped (and further processed), have to
> be GPLed?

no, at least not because of the GPL license of gccxml. But since this
enhanced form of gccxml might qualify as a translator, the code might
be governed by the original license of the input code.

cheers
Andreas



More information about the gccxml mailing list