comp.lang.ada
 help / color / mirror / Atom feed
* License and Compiler Confusion
@ 2006-03-25 16:46 Jason C. Wells
  2006-03-25 18:52 ` Martin Krischik
  2006-03-25 20:33 ` Björn Persson
  0 siblings, 2 replies; 10+ messages in thread
From: Jason C. Wells @ 2006-03-25 16:46 UTC (permalink / raw)


I am a FreeBSD user.  I was thinking of picking up a language and I am 
considering Ada.  I came across this:

	http://www.freebsd.org/cgi/url.cgi?ports/lang/gnat/pkg-descr

	Binaries built with this version of compiler are covered by the
	GPL license.  Use the Ada compiler bundled with GCC 4.0 and
	subsequent for LGPL licensing.

I also read the FAQ at adacore: 	
	
	https://libre2.adacore.com/dynamic/gnat_faq.html#licensing

I prefer to use a compiler that doesn't encumber my programs with any 
terms.  So I am confused by seemingly contradictory statements.  One 
source says I can't use gnat without encumbering my programs.  Another 
source says I can use gcc and my programs won't be encumbered.

Are gcc and gnat two different pieces of software?  I was under the 
impression that gnat was simply gcc with Ada related tweaks.

Can I write Ada 2005 programs without GPL-ing my code using a FOSS 
compiler?  How?

Gnat-3.15 doesn't confuse me.  I would use that except I suppose that if 
I am getting started I should write in the Ada 2005 spec rather than the 
95 spec.

Thanks,
Jason C. Wells



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

* Re: License and Compiler Confusion
  2006-03-25 16:46 License and Compiler Confusion Jason C. Wells
@ 2006-03-25 18:52 ` Martin Krischik
  2006-03-26 11:03   ` Björn Persson
  2006-04-05  1:27   ` mamboking
  2006-03-25 20:33 ` Björn Persson
  1 sibling, 2 replies; 10+ messages in thread
From: Martin Krischik @ 2006-03-25 18:52 UTC (permalink / raw)


Jason C. Wells wrote:

> I am a FreeBSD user.  I was thinking of picking up a language and I am
> considering Ada.  I came across this:
> 
> http://www.freebsd.org/cgi/url.cgi?ports/lang/gnat/pkg-descr
> 
> Binaries built with this version of compiler are covered by the
> GPL license.  Use the Ada compiler bundled with GCC 4.0 and
> subsequent for LGPL licensing.

Actually the compiler license is of no importance once the compiler finished
it's work. The resulting program can be of any license you like. However -
most compilers also provide a library some base functionality. And the
license of this library is of corse of great importance. In Ada you can
switch the use of that library off with "#pragma No_Runtime;" but then even
"Hello, World!" would not link any more.

The Ada runtime library comes with the GMGPL which is pretty permissive and
similar to the LGPL. Why not the LGPL? The LGPL is written for C and C has
no templates/generics - but Ada has.

> I also read the FAQ at adacore:
> 
> https://libre2.adacore.com/dynamic/gnat_faq.html#licensing

That's only for the Libre distributed runtime library of GNAT. For some
unknown reason they come with a stricter license then the FSF. But they are
not available for FreeBSD anyway so don't worry.

> I prefer to use a compiler that doesn't encumber my programs with any
> terms.  So I am confused by seemingly contradictory statements.  One
> source says I can't use gnat without encumbering my programs.  Another
> source says I can use gcc and my programs won't be encumbered.

Well depends where you download your sources from. Download from 
gcc.gnu.org and you get a permissive license, download from
libre.adacore.com and you get a more restricted license.

Why? We don't know, we can only guess from the fact that Libre is sponsored
by AdaCore the original maintainer of GNAT. And AdaCore has also a
professional version of GNAT called GNAT Pro for which they sell support.

> Are gcc and gnat two different pieces of software?  I was under the
> impression that gnat was simply gcc with Ada related tweaks.

Tweaks? GNAT is an Ada frontend to gcc. Just like g++ or gfortran. I would
not consider a frontend a "tweak". A frontend is a very big pice of code.

> Can I write Ada 2005 programs without GPL-ing my code using a FOSS
> compiler?

Yes you can. But you should be aware the Ada 2005 is not quite finished yet
(there was some talk about changing the name to Ada 2006 ;-) ).

> How? 

Best is to use gcc 4.1. If it is not packaged for FreeBSD yet I suggest you
role your own. Join the GNU Ada team if you want to do that
(http://gnuada.sf.net).

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



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

* Re: License and Compiler Confusion
  2006-03-25 16:46 License and Compiler Confusion Jason C. Wells
  2006-03-25 18:52 ` Martin Krischik
@ 2006-03-25 20:33 ` Björn Persson
  1 sibling, 0 replies; 10+ messages in thread
From: Björn Persson @ 2006-03-25 20:33 UTC (permalink / raw)


Jason C. Wells wrote:
> I am a FreeBSD user.  I was thinking of picking up a language and I am 
> considering Ada.

A wise choice. Welcome.

> I prefer to use a compiler that doesn't encumber my programs with any 
> terms.  So I am confused by seemingly contradictory statements.  One 
> source says I can't use gnat without encumbering my programs.  Another 
> source says I can use gcc and my programs won't be encumbered.
> 
> Are gcc and gnat two different pieces of software?  I was under the 
> impression that gnat was simply gcc with Ada related tweaks.

It's a lot more than just tweaks, but your impression was basically 
correct: Gnat is the Ada part of GCC. Adacore develops Gnat, and also 
packages and distributes Gnat in such a way that it may seem like a 
separate product.

The license of the compiler itself is GPL in all cases, but in the stock 
GCC distribution (and in Gnat 3.15p) there is an exception in the 
license of the run-time library so that it doesn't affect the license of 
  the programs you compile. Adacore has removed this exception from Gnat 
GPL, so Gnat GPL may only be used for GPL programs.

It's no wonder that you're confused, but the rule is simple when you 
know it: If the GPL isn't your license of choice, don't use Gnat GPL. 
Use the Gnat that is part of GCC instead.

-- 
Bj�rn Persson                              PGP key A88682FD
                    omb jor ers @sv ge.
                    r o.b n.p son eri nu



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

* Re: License and Compiler Confusion
  2006-03-25 18:52 ` Martin Krischik
@ 2006-03-26 11:03   ` Björn Persson
  2006-03-27  5:36     ` Jason C. Wells
  2006-04-05  1:27   ` mamboking
  1 sibling, 1 reply; 10+ messages in thread
From: Björn Persson @ 2006-03-26 11:03 UTC (permalink / raw)


Martin Krischik wrote:
> That's only for the Libre distributed runtime library of GNAT. For some
> unknown reason they come with a stricter license then the FSF. But they are
> not available for FreeBSD anyway so don't worry.

The package description that Jason linked to seems to indicate that 
someone has packaged Gnat GPL for FreeBSD.

-- 
Bj�rn Persson                              PGP key A88682FD
                    omb jor ers @sv ge.
                    r o.b n.p son eri nu



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

* Re: License and Compiler Confusion
  2006-03-26 11:03   ` Björn Persson
@ 2006-03-27  5:36     ` Jason C. Wells
  2006-03-27 12:15       ` Ludovic Brenta
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jason C. Wells @ 2006-03-27  5:36 UTC (permalink / raw)


Bj�rn Persson wrote:
> Martin Krischik wrote:
>> That's only for the Libre distributed runtime library of GNAT. For some
>> unknown reason they come with a stricter license then the FSF. But 
>> they are
>> not available for FreeBSD anyway so don't worry.
> 
> The package description that Jason linked to seems to indicate that 
> someone has packaged Gnat GPL for FreeBSD.

Someone wrote the package description before someone did the work.  I 
was perusing the CVS logs for the FreeBSD port.  The Ada frontend 
(thanks for pointing out that distinction) for GCC 4.1 is not yet 
included with FreeBSD's port of gcc41

I tried rolling my own diff to the FreeBSD port but I haven't figured 
out how to bootstrap the compilation.  Combinations of setting PATH and 
CC haven't worked so far.  I had hoped my existing gnat-3.15 would 
bootstrap gcc41 and just work.  The configure script says I have no 
support for Ada.

This means I'll have to actually dig into it, or wait for someone else. 
  Digging in isn't so bad since the intent here is learning.  There is 
nothing better to help me learn that to break something and then fix it.

Anyway, the original question has been answered.  GCC 4.1 has the 
license terms I desire.

Later,
Jason C. Wells



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

* Re: License and Compiler Confusion
  2006-03-27  5:36     ` Jason C. Wells
@ 2006-03-27 12:15       ` Ludovic Brenta
  2006-03-27 18:24       ` Martin Krischik
  2006-03-27 20:55       ` Karel Miklav
  2 siblings, 0 replies; 10+ messages in thread
From: Ludovic Brenta @ 2006-03-27 12:15 UTC (permalink / raw)


On FreeBSD, the compiler driver for GNAT 3.15p is "adagcc", not
"gcc". You should be able to bootstrap like this:

$ mkdir gcc.o
$ cd gcc.o
$ CC=adagcc ../gcc/configure --enable-languages=c,ada --prefix=/opt/...

In my experience, GNAT 3.15p can bootstrap GCC 4.1 without a problem.
It failed however when I tried to bootstrap GCC 4.0, long before it
reached the Ada front-end.

HTH

-- 
Ludovic Brenta.




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

* Re: License and Compiler Confusion
  2006-03-27  5:36     ` Jason C. Wells
  2006-03-27 12:15       ` Ludovic Brenta
@ 2006-03-27 18:24       ` Martin Krischik
  2006-03-27 20:55       ` Karel Miklav
  2 siblings, 0 replies; 10+ messages in thread
From: Martin Krischik @ 2006-03-27 18:24 UTC (permalink / raw)


Jason C. Wells wrote:

> I tried rolling my own diff to the FreeBSD port but I haven't figured
> out how to bootstrap the compilation. ï¿œCombinations of setting PATH and
> CC haven't worked so far. ï¿œI had hoped my existing gnat-3.15 would
> bootstrap gcc41 and just work. ï¿œThe configure script says I have no
> support for Ada.

Again I urge you to join The GNU Ada Project (gnuada.sf.net). You don't have
to wait until your gcc is up and running - even if you are unsuccessfull
you can still archive your work inside the Subversion repository for
someone else to pick it up later.

The GNU Ada Project allready has a large collection of build scripts which
you might want to look at.

Martin 

-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



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

* Re: License and Compiler Confusion
  2006-03-27  5:36     ` Jason C. Wells
  2006-03-27 12:15       ` Ludovic Brenta
  2006-03-27 18:24       ` Martin Krischik
@ 2006-03-27 20:55       ` Karel Miklav
  2 siblings, 0 replies; 10+ messages in thread
From: Karel Miklav @ 2006-03-27 20:55 UTC (permalink / raw)


Jason C. Wells wrote:
> Bj�rn Persson wrote:
>> The package description that Jason linked to seems to indicate that 
>> someone has packaged Gnat GPL for FreeBSD.
> 
> Someone wrote the package description before someone did the work.  I 
> was perusing the CVS logs for the FreeBSD port.  The Ada frontend 
> (thanks for pointing out that distinction) for GCC 4.1 is not yet 
> included with FreeBSD's port of gcc41

You're confusing things here. The gnat-2005 port is doing just fine,
but it builds the GPL-ed version. There was no Ada frontend in any
FreeBSD GCC port as far as I can tell. Perhaps it's not stable enough?

If you decide to build it on your own, listen to the people here,
check the gnat-2005 port for some bootstraping tricks, and don't forget
to share your experience.

Otherwise you can always 'cd /usr/ports/lang/gnat ; make install
clean' and worry about the details later.

--

Regards,
Karel Miklav



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

* Re: License and Compiler Confusion
  2006-03-25 18:52 ` Martin Krischik
  2006-03-26 11:03   ` Björn Persson
@ 2006-04-05  1:27   ` mamboking
  2006-04-05  2:33     ` Jeffrey Creem
  1 sibling, 1 reply; 10+ messages in thread
From: mamboking @ 2006-04-05  1:27 UTC (permalink / raw)


I was wondering who is maintaining the runtime libraries?  Is it the
gcc folks or AdaCore?  Is it possible that there could ever be a fork
in the runtime libraries where something new is added to the GPL
version and can't be added to the GMGPL?

Just curious.

Kevin Hostelley




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

* Re: License and Compiler Confusion
  2006-04-05  1:27   ` mamboking
@ 2006-04-05  2:33     ` Jeffrey Creem
  0 siblings, 0 replies; 10+ messages in thread
From: Jeffrey Creem @ 2006-04-05  2:33 UTC (permalink / raw)


mamboking wrote:
> I was wondering who is maintaining the runtime libraries?  Is it the
> gcc folks or AdaCore?  Is it possible that there could ever be a fork
> in the runtime libraries where something new is added to the GPL
> version and can't be added to the GMGPL?
> 
> Just curious.
> 
> Kevin Hostelley
> 

The driving force behind the compiler and run time libraries still is 
largely AdaCore even in the FSF tree though there is certainly some work 
  that happens on Ada in the FSF tree that is not done by people working 
for AdaCore. (I am basing this on gcc developer list traffic and SVN/CVS 
checkin messages browsed informally over many months)

Anything that gets added to the GPL version is by definition coming from 
AdaCore (since they are the ones that release the GPL version). So, if 
they create something and decide to not include it in the FSF tree then 
this could happen.

It is also theoretically possible that at some point the FSF tree could 
change to pure GPL.

Having said that, there has been zero traffic on the GCC developers list 
discussing any switch of the runtime license within that tree and it is 
certainly something that I would think would require steering committee 
approval.

Not contributing patches, new files, features, etc to the FSF tree would 
of course not require approval from anyone.

So, the short answer is yes it is possible that there could be a "fork" 
or other development approach where the two diverge.


I would guess that AdaCore probably has done "enough" to prevent 
themselves from competing against themselves by not releasing official 
GMGPL AdaCore versions of GNAT. They made the business decision to move 
into the GCC tree because they thought it would add value to themselves 
and their customers. If something changes, they could step away from 
that. It is probably not worth speculating on if/when/why this might 
happen.

If you go with a pure proprietary vendor for some product and they 
decide to "walk away" from it, you are totally stuck. At least if 
AdaCore, FSF or anyone "walks away" or closes the door on future GMGPL 
versions of Ada support in GCC, you or the community has the chance of 
keeping it somewhat alive



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

end of thread, other threads:[~2006-04-05  2:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-25 16:46 License and Compiler Confusion Jason C. Wells
2006-03-25 18:52 ` Martin Krischik
2006-03-26 11:03   ` Björn Persson
2006-03-27  5:36     ` Jason C. Wells
2006-03-27 12:15       ` Ludovic Brenta
2006-03-27 18:24       ` Martin Krischik
2006-03-27 20:55       ` Karel Miklav
2006-04-05  1:27   ` mamboking
2006-04-05  2:33     ` Jeffrey Creem
2006-03-25 20:33 ` Björn Persson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox