Tim McGuire
mcg...@cs.tamu.edu
This was discussed some time ago on this group. The answer is yes.
Code compiled with GCC can be sold commercially without having to
distribute the source of the product. There are different
restrictions, however, if the GNU C Library is used. You should check
the legal documents found in the GCC and GLIB distributions on
prep.ai.mit.edu, or any of its mirrors. But its always safest to
consult your lawyer before you start development with any tool,
including GCC.
Personal opinion: It would also be great if you could contribute to
the GNU project in some way and support the continued development of
GCC and other GNU ventures. They provide so many software developers
with excellent tools, I like to help them when I can. You could buy
one of the GNU distribution CDs (which come with GCC), or the manuals
for GCC, GDB, GNU Make, GNU Emacs, etc.
Tim McGuire
mcg...@cs.tamu.edu
--
Kevin K. Lewis | My opinions may be unreasonable
lew...@aud.alcatel.com | but such is the voice of inspiration
Sure. The GPL doesn't prohibit you from selling your program commercially.
It just prevents you from prohibiting your customers from further
redistributing it, and it requires you to distribute source.
Anyway, the GPL says:
... the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
I've read here on many occasions that the FSF doesn't consider the output
of GCC to constitute a work based on the program. I don't know where this
is stated in print, though.
However, if you link with libgcc, I think the result is considered a
derivative work of libgcc, so you will fall under the GPL for that. Had
libgcc been distributed using the GLPL rather than the GPL, this would not
have been true (you would have to supply linkable object files for your
program, but not sources, and you wouldn't have to allow redistribution of
your code).
--
Barry Margolin
System Manager, Thinking Machines Corp.
bar...@think.com {uunet,harvard}!think!barmar
Barry> However, if you link with libgcc, I think the result is
Barry> considered a derivative work of libgcc, so you will fall under
Barry> the GPL for that. Had libgcc been distributed using the GLPL
Barry> rather than the GPL, this would not have been true (you would
Barry> have to supply linkable object files for your program, but not
Barry> sources, and you wouldn't have to allow redistribution of your
Barry> code).
I believe you mean the GNU C library. "libgcc" is a special library
that implements various functions that gcc can't inline (I think that
some floating point operations fall into this category, at least on
some achitectures).
Here is some text from the top of libgcc1.c which indicates that
copyright permissions on this file are more lenient:
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
Tom
--
tro...@cns.caltech.edu
"In a riddle whose answer is chess, what is the only prohibited word?"
I thought a moment and replied, "The word chess".
-- Jorge Luis Borges
>However, if you link with libgcc, I think the result is considered a
>derivative work of libgcc, so you will fall under the GPL for that.
Normally, that would be true. However, the libgcc source is
explicitly NOT restricted by the GPL. The following comment appears
in each of the libgcc source files:
/* As a special exception, if you link this library with files
compiled with GCC to produce an executable, this does not cause
the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
--
Jerry Frain | TIVOLI Systems, Inc. | "You can have my DG
Jerry...@Tivoli.COM | 6034 W. Courtyard Dr. #210 | when you pry it from
Phone: (512) 794-9070 | Austin, TX 78730, USA | my cold, dead fingers."
This is a FAQ. Yes, one can use gcc as a compiler legally.
Unfortunately, much disinformation travels around in various circles,
about what can, and can't be done.
Please point anyone that claims otherwise to me, and I can pound on
their head.
bar...@think.com (Barry Margolin) writes:
>I've read here on many occasions that the FSF doesn't consider the output
>of GCC to constitute a work based on the program. I don't know where this
>is stated in print, though.
RMS (head of FSF, which owns the copyright to gcc) has stated this himself
a number of times in postings to these groups, and these are archived.
>However, if you link with libgcc, I think the result is considered a
>derivative work of libgcc, so you will fall under the GPL for that.
Wrong. Every module in libgcc contains the following text (from 2.6.0)
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
Use of libgcc only brings code under the GPL if it is used with some other
compiler and gcc is not used at all.
Code compiled with gcc and linked with libgcc.a (but no other GNU
libraries) is completely unencumbered. *THIS IS NOT A DEBATABLE POINT*.
It doesn't matter whether your reading of the GPL suggests otherwise,
because official spokespeople for the FSF have said so, in writing.
Even if some judge says some day that object code is a derivative work of
the compiler under copyright law, the public statements from the FSF
disavowing any such rights are already on the record.
--
-- Joe Buck <jb...@synopsys.com>
Posting from but not speaking for Synopsys, Inc.
***** Stamp out junk e-mail spamming! If someone sends you a junk e-mail
***** ad just because you posted in comp.foo, boycott their company.
I wrote:
>Code compiled with gcc and linked with libgcc.a (but no other GNU
>libraries) is completely unencumbered. *THIS IS NOT A DEBATABLE POINT*.
Replace "GNU libraries" with "GPLed or LGPLed libraries, or other code you
do not own that has any restrictions placed on it".
Also, the C++ iostream classes from libg++ have the same "as a special
exception" language, and so will other classes that are required by the
emerging ANSI/ISO C++ standard, when they are produced, so that C++
programmers who use only the standard classes will have no restrictions at
all on their code.
Actually, I meant to say "if you link with glibc". I assume the libc on
Linux is glibc, right?
Also, where is the exception about GCC's code generation templates written
down explicitly?
In article <jerry.775886539@kenya> je...@tivoli.com (Jerry Frain) writes:
>>Normally, that would be true. However, the libgcc source is
>>explicitly NOT restricted by the GPL.
bar...@think.com (Barry Margolin) writes:
>Actually, I meant to say "if you link with glibc". I assume the libc on
>Linux is glibc, right?
Yes, but even with this change, your original claim is still wrong, since
glibc (and the Linux C library) is under the LGPL, and is implemented as a
shared library, so that dynamically linked proprietary "hoarded"
executables on Linux (that use the C library) are completely legit --
implementation as a shared library and dynamically linked executables
satisfies all the requirements of the LGPL. A proprietary binary-only
Motif port for Linux was explicitly blessed by RMS.
Actually, there is are some additional requirements: the licensing terms
for the executable that uses LGPL code must "permit modification of the
work for the customer's own use and reverse engineering for debugging such
modifications.") Some of the other requirements of the LGPL (distribute
the source to the library) do not apply in the case of Linux, because of
the clause that states "However, as a special exception, the source code
distributed need not include anything that is normally distributed (in
either source or binary form) with the major components (compiler, kernel,
and so on) of the operating system on which the executable runs, unless
that component itself accompanies the executable." All Linux
distributions include the Linux C library, which is based on the GNU C
library.
>Also, where is the exception about GCC's code generation templates written
>down explicitly?
So you won't give up, will you? You're referring to the instruction
sequences that appear in the .md files for some operations, no doubt. I
doubt that the two-instruction sequence to perform some standard operation
on a standard processor can be copyrighted by FSF (the form in which they
appear in the .md files can, but not the final sequence that appears in
your binary which is likely the same as that produced by competing
compilers), and the longer sequences that conceivably could be copyrighted
are in libgcc with the explicit waiver on them. However, even if I'm
wrong, the repeated public statements of Richard Stallman and Len Tower,
both in positions that let them speak officially for the FSF, the
copyright owner, *have* been written down explicitly, and they appear in
the archives for the various gnu groups. *FSF makes no claim to gcc
output if you own all the input.* Even if they could, they have waived
such rights. End of story.
: I am one of the developers of a commercial software product. Thus far
: we have bought commercial compilers instead of using gcc because we were
: unsure of whether we could legally do so. However, now we have had requests
: for a linux version and my limited search shows that only gcc is available.
: So, my question is, can we use gcc as a compiler legally?
: This was discussed some time ago on this group. The answer is yes.
: Code compiled with GCC can be sold commercially without having to
: distribute the source of the product. There are different
: restrictions, however, if the GNU C Library is used. You should check
: the legal documents found in the GCC and GLIB distributions on
: prep.ai.mit.edu, or any of its mirrors. But its always safest to
: consult your lawyer before you start development with any tool,
: including GCC.
Yes that is correct. Code you develop can be legally sold comercially
and without divulging source code or forfeiting your own copyrights and/or
licensing arangements. The libraries as well have a licensing scheme which
will allow commercial development. However, if you are using the shared
libs, then there's no need to worry about folks wanting to relink with new
libs, since it's done dynamically.
But I would say it would be good to consult a lawer to put your mind
at ease.
: Personal opinion: It would also be great if you could contribute to
: the GNU project in some way and support the continued development of
: GCC and other GNU ventures. They provide so many software developers
: with excellent tools, I like to help them when I can. You could buy
: one of the GNU distribution CDs (which come with GCC), or the manuals
: for GCC, GDB, GNU Make, GNU Emacs, etc.
P.S. I don't speak for FSF.
--
Kenneth Sorensen | ks...@sed.hac.com
------------------------------------+----------------------------------
Hughes Aircraft Company | Phone: (714) 732-9816
P.O. Box 3310 | Fax: (714) 732-1953
Fullerton, California, US +----------------------------------
92634-3310, Mail Station: 618/B223 | #include <std-disclaimer.h>