[gnu.g++.bug] Questions about "Free Software Foundation"

tuck@jason.cs.unc.edu (Russ Tuck) (09/30/89)

In article <6602@thor.acc.stolaf.edu> mike@thor.stolaf.edu () writes:
>
>1.  You can use g++ for commercial work.
>
>2.  You cannot use libg++ in commercial products without bringing
>    them within the scope of the GNU license.  We may change this in
>    the future, if we think that is the only way GNU will be accepted
>    into widespread use.  But we will look long and hard at such a
>    change first.

Until g++ 1.36 changed the way it links programs, this made sense to me.
In effect, it says there's no copyleft on your executable unless you
explicitly link in something copylefted (like libg++.a).

However, g++ 1.36 now requires "-lg++" to link ANY program.  So the above
rules now make it impossible to use g++ without making the executable
copylefted.  (g++ compiles "main()" to include a call to "___main()",
which is contained in libg++.a.)

I consider this a bug in g++, or a dramatic policy change.

(This isn't an immediate issue for me, since I'm currently at a Univ.
and don't charge money when I share my code anyway.  But I'm still
surprised at the change.)

Russ Tuck		               tuck@cs.unc.edu
UNC Dept. of Computer Science          ...!mcnc!unc!tuck
CB# 3175 Sitterson Hall
Chapel Hill, NC 27599-3175, USA        (919) 962-1755 or 962-1932

schmidt@zola.ics.uci.edu (Doug Schmidt) (09/30/89)

In article <9741@thorin.cs.unc.edu>, tuck@jason (Russ Tuck) writes:
>Until g++ 1.36 changed the way it links programs, this made sense to me.
>In effect, it says there's no copyleft on your executable unless you
>explicitly link in something copylefted (like libg++.a).
>
>However, g++ 1.36 now requires "-lg++" to link ANY program.  So the above
>rules now make it impossible to use g++ without making the executable
>copylefted.  (g++ compiles "main()" to include a call to "___main()",
>which is contained in libg++.a.)
>
>I consider this a bug in g++, or a dramatic policy change.

It is a policy change, but not in the direction you imply above.

You are referring, of course, to the gnulib3.c file with the beta
release of g++ 1.36.  Please look at the file right now (I assume
you've got access to it, or you wouldn't be writing this ;-)).

Note how this file differs from most of the other libg++ files.  In
fact, it looks much like the gnulib.c and gnulib2.c from the gcc
release, in that it doesn't contain a copyright notice at the top.

This omission means that linking with the small `compiler-helper'
functions declared in this file does *not* by itself bring the
executable under the copyleft (the same may not hold for other libg++
files...).

In fact, certain changes to g++ 1.36 (e.g., omitting the need for a
special crt0.o file) specifically mean that you *can* use the g++
compiler (and its small helper functions in the gnulib[23]?.c files)
without necessarily bringing the entire program under the copyleft
(assuming, of course, that you don't include the copylefted libraries
from libg++, etc.).

The situation described in the previous paragraph was not true with
previous releases g++.  That is why I said above that there was a
policy change, but not in the direction you implied!

I know at this point that Jim Adcock will step in and say that this
whole g++/libg++ library situation is unduly confusing.  I agree with
him.  I hope that my explanation has helped shed a little light on an
often easily mis-understood issue.

Doug
--
schmidt@ics.uci.edu (ARPA) |   Per me si va nella citta' dolente.
office: (714) 856-4043     |   Per me si va nell'eterno dolore.
                           |   Per me si va tra la perduta gente.
                           |   Lasciate ogni speranza o voi ch'entrate.

tiemann@LURCH.STANFORD.EDU (Michael Tiemann) (10/02/89)

    However, g++ 1.36 now requires "-lg++" to link ANY program.  So the above
    rules now make it impossible to use g++ without making the executable
    copylefted.  (g++ compiles "main()" to include a call to "___main()",
    which is contained in libg++.a.)

    I consider this a bug in g++, or a dramatic policy change.
Why don't you look at where __main really comes from, and check the
copyleft on that file.  You will not find one.  It is just a matter of
convenience that it comes from libg++.a.  If you want to jump through
the various hoops to get it from elsewhere, that is your configuration
business.

Michael