GPL and GCC profiling
Thu Jul 1 16:28:00 GMT 2004

Ian Lance Taylor <> writes:

> Tobias Oberstein <> writes:
> > > library is never part of gcc.  gcc itself imposes no restrictions on
> > > code compiled with profiling.  Any such restrictions come from
> > > somewhere else.
> > 
> > but the profiling library has to be called and for that calls
> > there has to be code generated automatically isn't it? who
> > inserts that code? gcc? then what about the copyright of
> > those injected calls to an external (system provided, non-GPL'ed)
> > library? injecting a _single_ line of GPL'ed code would be
> > enough to trigger license terms proliferation or not?
> There is nothing special about profiling in this regard, of course.
> This amounts to saying that all code generated by the compiler is
> under the GPL, because the generated code is constructed by GPL code.
> I think that is pretty far-fetched.  I've never heard anybody
> seriously propose that.

IIRC, one of the primary differences between GPL v1 and GPL v2 was
    intended to eliminate that possibility.

Additionally, the runtime libraries that come with gcc, libgcc,
    libsupc++, libstdc++, etc, are not under a pure GPL; they are
    licensed under GPL + special exception intended to prevent the GPL
    from affecting the license of code developed using GCC. 

> The direct copying is essentially of strings
> like "call" into the generated assembler file.  All GPL claims rely on
> the notion of derived work under copyright law; I think it would be
> pretty difficult to claim that copying a string like "call" makes the
> generated file a derived work.
> Ian

More information about the Gcc-help mailing list