public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GPL and GCC profiling
@ 2004-06-30 22:23 Tobias Oberstein
  2004-07-01 11:53 ` Ken Foskey
  2004-07-01 12:18 ` Eljay Love-Jensen
  0 siblings, 2 replies; 14+ messages in thread
From: Tobias Oberstein @ 2004-06-30 22:23 UTC (permalink / raw)
  To: gcc-help

i'm looking for any information/discussion about
licensing issues (GPL) when using GCC with profiling
to develop software under a license incompatible
with the GPL

any hints appreciated,

Tobias

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

* Re: GPL and GCC profiling
  2004-06-30 22:23 GPL and GCC profiling Tobias Oberstein
@ 2004-07-01 11:53 ` Ken Foskey
  2004-07-01 12:18 ` Eljay Love-Jensen
  1 sibling, 0 replies; 14+ messages in thread
From: Ken Foskey @ 2004-07-01 11:53 UTC (permalink / raw)
  To: gcc help

On Thu, 2004-07-01 at 08:21, Tobias Oberstein wrote:
> i'm looking for any information/discussion about
> licensing issues (GPL) when using GCC with profiling
> to develop software under a license incompatible
> with the GPL
> 
> any hints appreciated,

You are able to develop code in C / C++ that is not using GPL.  You can
sell that executable code.

If you use code FROM gcc or g++ to create a program that does
profiling.  Then you are bound by the license of GPL.  If you use the
documentation of gcc to create your own program code that analyse output
from gcc or g++ then you are free to license as you please.

For a better answer please take a look on the web there are numerous
articles about GPL.

-- 
Thanks
KenF
OpenOffice.org developer

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

* Re: GPL and GCC profiling
  2004-06-30 22:23 GPL and GCC profiling Tobias Oberstein
  2004-07-01 11:53 ` Ken Foskey
@ 2004-07-01 12:18 ` Eljay Love-Jensen
  2004-07-01 13:42   ` Tobias Oberstein
  1 sibling, 1 reply; 14+ messages in thread
From: Eljay Love-Jensen @ 2004-07-01 12:18 UTC (permalink / raw)
  To: Tobias Oberstein, gcc-help

Hi Tobias,

When you say "...using GCC..." I presume that you are using it to produce a 
new application (one that doesn't violate the extensions to GCC's GPL).

I'm not part of FSF.  I'm not a lawyer.  My comments are merely my naive 
understanding.

GCC has a very liberal license regarding using GCC to produce applications, 
even if the other application is not GPL.  Even if the other application is 
wholly proprietary.  (Except in a few instances, as specified in GCC's GPL 
extensions ... those few instances are, basically, to protect GCC itself 
from being lifted and repackaged as proprietary).

If you have concerns about GCC and use in your product, you should contact 
your company's lawyers and have them review the GCC GPL & extensions, and 
read and interpret the GCC GPL & extensions for yourself.

Note - this forum is made up of a community of a GCC users.  A self-help 
group.  There are few FSF members, and I presume that those who do frequent 
this forum are not in a position to give legal advice about GPL and/or the 
GCC extensions to it.

In other words, what you read on this forum is opinion and interpretation.

Sincerely,
--Eljay

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

* Re: GPL and GCC profiling
  2004-07-01 12:18 ` Eljay Love-Jensen
@ 2004-07-01 13:42   ` Tobias Oberstein
  2004-07-01 13:58     ` Eljay Love-Jensen
                       ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Tobias Oberstein @ 2004-07-01 13:42 UTC (permalink / raw)
  To: Eljay Love-Jensen; +Cc: gcc-help

Eljay,

> When you say "...using GCC..." I presume that you are using it to 
> produce a new application (one that doesn't violate the extensions to 
> GCC's GPL).
> 

sorry: by "using GCC" i'm referring to the situation when
i have C++ source code completely unrelated to GCC/GNU and
feed it through GCC to produce native machine code.
that is GCC used as a blackbox tool.

> I'm not part of FSF.  I'm not a lawyer.  My comments are merely my naive 
> understanding.

that's great. i never expected hard legal advice but exactly those
little hints and ptrs you share. thanks for those.

> 
> GCC has a very liberal license regarding using GCC to produce 
> applications, even if the other application is not GPL.  Even if the 
> other application is wholly proprietary.  (Except in a few instances, as 
> specified in GCC's GPL extensions ... those few instances are, 
> basically, to protect GCC itself from being lifted and repackaged as 
> proprietary).

my understanding of GCC/GPL up 'til recently was, that
in the described situation both the C++ source code and
the resulting native machine code can be placed under any
license (if you have full author rights of course):
properietory, BSD with advertising clause, any GPL incompatible
license, whatever ..

now i became aware of a FAQ (for MinGW) about GCC and profiling:

[quote from http://www.mingw.org/mingwfaq.shtml:
Profiled code, which is code compiled and linked with the -pg option for 
runtime profiling, also falls under the GNU General Public License. 
CAUTION: do not distribute proprietary source with profiling enabled. 
The profiling library is covered by the GPL which infects your product 
to conform to the GPL as well.
]

The GPL FAQ says:

[quote from http://www.gnu.org/licenses/gpl-faq.html#GPLOutput:
In what cases is the output of a GPL program covered by the GPL too?
     Only when the program copies part of itself into the output.
]

my current understanding is this:

i guess when building software with GCC and profiling enabled, GCC
puts profiling code into the resulting executable. the resulting
exectuable would be covered by GPL and thus not immediately
publishing the source that led to that executable means a
violation of the GPL.

so even if we don't dsitribute a release version of our software
with profiling code, using profiling while developing the software
infects our source.

so my interpretation is that one can't use GCC _with profiling_
to develop software licensed under a license incompatible
with the GPL.

or does it only mean i must release source if i distribute an
executable containing GCC profiling code? and what does
"distribute" then include?

this is all very obscure to me.

> 
> If you have concerns about GCC and use in your product, you should 
> contact your company's lawyers and have them review the GCC GPL & 
> extensions, and read and interpret the GCC GPL & extensions for yourself.
>

well, do you think i can realistically find a lawyer who
understands all legal implication of using GCC/GPL'ed tools in
building software with GPL-incompatible license? you know one?

> Note - this forum is made up of a community of a GCC users.  A self-help 
> group.  There are few FSF members, and I presume that those who do 
> frequent this forum are not in a position to give legal advice about GPL 
> and/or the GCC extensions to it.

does it mean you would go posting to a list on http://www.fsf.org
instead?

> 
> In other words, what you read on this forum is opinion and interpretation.
> 
> Sincerely,
> --Eljay
> 
> 

Cheers,
Tobias

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

* Re: GPL and GCC profiling
  2004-07-01 13:42   ` Tobias Oberstein
@ 2004-07-01 13:58     ` Eljay Love-Jensen
  2004-07-01 14:38       ` Tobias Oberstein
  2004-07-01 14:04     ` Ian Lance Taylor
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Eljay Love-Jensen @ 2004-07-01 13:58 UTC (permalink / raw)
  To: Tobias Oberstein; +Cc: gcc-help

Hi Tobias,

 >so even if we don't dsitribute a release version of our software with 
profiling code, using profiling while developing the software infects our 
source.

Your statement contradicts the statement you posted from the MinGW FAQ.  (I 
don't know which is correct.)

 >this is all very obscure to me.

Legalese is a foreign language to me.

 >well, do you think i can realistically find a lawyer who understands all 
legal implication of using GCC/GPL'ed tools in building software with 
GPL-incompatible license?

Yes, in-as-much as any lawyer is conversant with the law.

 >you know one?

Not personally, no.

 >does it mean you would go posting to a list on http://www.fsf.org instead?

I believe they will all direct you to seek your own legal consultant, or to 
read and interpret the GCC GPL & extensions on your own.

Sincerely,
--Eljay

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

* Re: GPL and GCC profiling
  2004-07-01 13:42   ` Tobias Oberstein
  2004-07-01 13:58     ` Eljay Love-Jensen
@ 2004-07-01 14:04     ` Ian Lance Taylor
  2004-07-01 15:03       ` Tobias Oberstein
  2004-07-01 14:11     ` Daniel Berlin
  2004-07-02  8:45     ` Brian Gough
  3 siblings, 1 reply; 14+ messages in thread
From: Ian Lance Taylor @ 2004-07-01 14:04 UTC (permalink / raw)
  To: Tobias Oberstein; +Cc: gcc-help

Tobias Oberstein <tobias.oberstein@gmx.de> writes:

> now i became aware of a FAQ (for MinGW) about GCC and profiling:
> 
> [quote from http://www.mingw.org/mingwfaq.shtml:
> Profiled code, which is code compiled and linked with the -pg option
> for runtime profiling, also falls under the GNU General Public
> License. CAUTION: do not distribute proprietary source with profiling
> enabled. The profiling library is covered by the GPL which infects
> your product to conform to the GPL as well.
> ]

This may well be true on MinGW.  The profiling library used on MinGW
may fall under the GPL.  Whether it does or not is a MinGW issue, not
a gcc issue.

> i guess when building software with GCC and profiling enabled, GCC
> puts profiling code into the resulting executable. the resulting
> exectuable would be covered by GPL and thus not immediately
> publishing the source that led to that executable means a
> violation of the GPL.

This is not true on most platforms.  On most platforms, the profiling
library (e.g., -lpg and gcrt1.o) is part of the system.  The profiling
library is never part of gcc.  gcc itself imposes no restrictions on
code compiled with profiling.  Any such restrictions come from
somewhere else.

> or does it only mean i must release source if i distribute an
> executable containing GCC profiling code? and what does
> "distribute" then include?

Correct.  The GPL only comes into effect when you distribute code.
See the GPL FAQ:
    http://www.fsf.org/licenses/gpl-faq.html

> > If you have concerns about GCC and use in your product, you should
> > contact your company's lawyers and have them review the GCC GPL &
> > extensions, and read and interpret the GCC GPL & extensions for
> > yourself.
> >
> 
> well, do you think i can realistically find a lawyer who
> understands all legal implication of using GCC/GPL'ed tools in
> building software with GPL-incompatible license? you know one?

Nobody understands all the legal implications, because some of them
are unknown at this time.  That said, any competent IP lawyer should
be able to advise you.

> does it mean you would go posting to a list on http://www.fsf.org
> instead?

Try the newsgroup gnu.misc.discuss.

Ian

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

* Re: GPL and GCC profiling
  2004-07-01 13:42   ` Tobias Oberstein
  2004-07-01 13:58     ` Eljay Love-Jensen
  2004-07-01 14:04     ` Ian Lance Taylor
@ 2004-07-01 14:11     ` Daniel Berlin
  2004-07-01 15:37       ` Tobias Oberstein
  2004-07-02  8:45     ` Brian Gough
  3 siblings, 1 reply; 14+ messages in thread
From: Daniel Berlin @ 2004-07-01 14:11 UTC (permalink / raw)
  To: Tobias Oberstein; +Cc: Eljay Love-Jensen, gcc-help

On Thu, 2004-07-01 at 15:41 +0200, Tobias Oberstein wrote:
> Eljay,
> > 
> > If you have concerns about GCC and use in your product, you should 
> > contact your company's lawyers and have them review the GCC GPL & 
> > extensions, and read and interpret the GCC GPL & extensions for yourself.
> >
> 
> well, do you think i can realistically find a lawyer who
> understands all legal implication of using GCC/GPL'ed tools in
> building software with GPL-incompatible license? you know one?

There are some of us out there :)

(well, not quite yet, I won't be licensed to practice law in any state
for at least a few months).
--Dan

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

* Re: GPL and GCC profiling
  2004-07-01 13:58     ` Eljay Love-Jensen
@ 2004-07-01 14:38       ` Tobias Oberstein
  0 siblings, 0 replies; 14+ messages in thread
From: Tobias Oberstein @ 2004-07-01 14:38 UTC (permalink / raw)
  To: Eljay Love-Jensen; +Cc: gcc-help, ian, dberlin

Eljay,

>  >so even if we don't dsitribute a release version of our software with 
> profiling code, using profiling while developing the software infects 
> our source.
> 
> Your statement contradicts the statement you posted from the MinGW FAQ.  
> (I don't know which is correct.)

yes, it contradicts and i either don't know which is correct (when
applied to GCC not MinGW e.g.), which exactly is the point that
makes me think twice.

i've just learned (from the GPL FAQ) that the GPL'ed Bison parser
generator embeds own code into executables .. but FSF made an
_explicit_ exception within the Bison license to avoid proliferation
of GPL terms into resulting artifacts. from my understanding, the FSF
seems to decide on those exceptions on a case by case basis (depending
on whether a proprietary replacement for the FSF software exists).
this is great, but in general it means i'm betting on FSF's future
decisions in this area (GNU tools generating/embedding code into
artifacts) which obviously i can't influence. no FUD intended - just
want to get clear myself.

Cheers,
Tobias

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

* Re: GPL and GCC profiling
  2004-07-01 14:04     ` Ian Lance Taylor
@ 2004-07-01 15:03       ` Tobias Oberstein
  2004-07-01 15:36         ` Ian Lance Taylor
  0 siblings, 1 reply; 14+ messages in thread
From: Tobias Oberstein @ 2004-07-01 15:03 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help, dberlin, eljay

Ian,

> This is not true on most platforms.  On most platforms, the profiling
> library (e.g., -lpg and gcrt1.o) is part of the system.  The profiling

ah, ok. wasn't aware of that.

> 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?

>>or does it only mean i must release source if i distribute an
>>executable containing GCC profiling code? and what does
>>"distribute" then include?
> 
> Correct.  The GPL only comes into effect when you distribute code.
> See the GPL FAQ:
>     http://www.fsf.org/licenses/gpl-faq.html
> 

ok, should have read the complete FAQ;) guess you're referring
to http://www.fsf.org/licenses/gpl-faq.html#InternalDistribution

now, from this i interpret: for a commercial software business to
contract an external independent freelancer to develop code
might expose the business to legal threats:

"In particular, providing copies to contractors for use off-site is 
distribution."

that is, if the freelancer "distributes" an executable with profiling
embedded to the contracting body (for test reasons e.g.), that
would violate license terms at least for MinGW exposing the
business to legal threats. you already emphasized profiling license
terms are specific to MingGW, not GCC.

> Nobody understands all the legal implications, because some of them
> are unknown at this time.  That said, any competent IP lawyer should

guess this is very true and probably brings the whole issue to the
point. hold back your arms .. i'm not in the FUD game.

Cheers,
Tobias

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

* Re: GPL and GCC profiling
  2004-07-01 15:03       ` Tobias Oberstein
@ 2004-07-01 15:36         ` Ian Lance Taylor
  2004-07-01 16:28           ` llewelly
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Lance Taylor @ 2004-07-01 15:36 UTC (permalink / raw)
  To: Tobias Oberstein; +Cc: gcc-help, dberlin, eljay

Tobias Oberstein <tobias.oberstein@gmx.de> 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.  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

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

* Re: GPL and GCC profiling
  2004-07-01 14:11     ` Daniel Berlin
@ 2004-07-01 15:37       ` Tobias Oberstein
  2004-07-01 15:40         ` Daniel Berlin
  0 siblings, 1 reply; 14+ messages in thread
From: Tobias Oberstein @ 2004-07-01 15:37 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: Eljay Love-Jensen, gcc-help, ian

Daniel,

>>well, do you think i can realistically find a lawyer who
>>understands all legal implication of using GCC/GPL'ed tools in
>>building software with GPL-incompatible license? you know one?
> 
> 
> There are some of us out there :)
> 
> (well, not quite yet, I won't be licensed to practice law in any state
> for at least a few months).

aha;)

btw: the FSF sits in Boston, MA. does it mean tentative violations of
the GPL by any global (e.g. non-US) entity will be brought to court
in Massachusetts?

greets,
Tobias

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

* Re: GPL and GCC profiling
  2004-07-01 15:37       ` Tobias Oberstein
@ 2004-07-01 15:40         ` Daniel Berlin
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Berlin @ 2004-07-01 15:40 UTC (permalink / raw)
  To: Tobias Oberstein; +Cc: Eljay Love-Jensen, gcc-help, ian

On Thu, 2004-07-01 at 17:35 +0200, Tobias Oberstein wrote:
> Daniel,
> 
> >>well, do you think i can realistically find a lawyer who
> >>understands all legal implication of using GCC/GPL'ed tools in
> >>building software with GPL-incompatible license? you know one?
> > 
> > 
> > There are some of us out there :)
> > 
> > (well, not quite yet, I won't be licensed to practice law in any state
> > for at least a few months).
> 
> aha;)
> 
> btw: the FSF sits in Boston, MA. does it mean tentative violations of
> the GPL by any global (e.g. non-US) entity will be brought to court
> in Massachusetts?

As with everything in law, it depends (i'm not going to enumerate the
entire tree of possibilities, as it's way offtopic for the list).

--Dan

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

* Re: GPL and GCC profiling
  2004-07-01 15:36         ` Ian Lance Taylor
@ 2004-07-01 16:28           ` llewelly
  0 siblings, 0 replies; 14+ messages in thread
From: llewelly @ 2004-07-01 16:28 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Tobias Oberstein, gcc-help, dberlin, eljay

Ian Lance Taylor <ian@wasabisystems.com> writes:

> Tobias Oberstein <tobias.oberstein@gmx.de> 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

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

* Re: GPL and GCC profiling
  2004-07-01 13:42   ` Tobias Oberstein
                       ` (2 preceding siblings ...)
  2004-07-01 14:11     ` Daniel Berlin
@ 2004-07-02  8:45     ` Brian Gough
  3 siblings, 0 replies; 14+ messages in thread
From: Brian Gough @ 2004-07-02  8:45 UTC (permalink / raw)
  To: Tobias Oberstein; +Cc: gcc-help

Tobias Oberstein <tobias.oberstein@gmx.de> writes:

> well, do you think i can realistically find a lawyer who
> understands all legal implication of using GCC/GPL'ed tools in
> building software with GPL-incompatible license? you know one?

The FSF have a (fee-based) license consulting service, which covers
these types of questions.

There are reduced rates for corporate patrons, with an initial 2 free
hours -- see http://patron.fsf.org/benefits.html for details.

I have used the service myself for checking compliance with the GFDL,
and it worked well.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

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

end of thread, other threads:[~2004-07-02  8:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-30 22:23 GPL and GCC profiling Tobias Oberstein
2004-07-01 11:53 ` Ken Foskey
2004-07-01 12:18 ` Eljay Love-Jensen
2004-07-01 13:42   ` Tobias Oberstein
2004-07-01 13:58     ` Eljay Love-Jensen
2004-07-01 14:38       ` Tobias Oberstein
2004-07-01 14:04     ` Ian Lance Taylor
2004-07-01 15:03       ` Tobias Oberstein
2004-07-01 15:36         ` Ian Lance Taylor
2004-07-01 16:28           ` llewelly
2004-07-01 14:11     ` Daniel Berlin
2004-07-01 15:37       ` Tobias Oberstein
2004-07-01 15:40         ` Daniel Berlin
2004-07-02  8:45     ` Brian Gough

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