comp.lang.ada
 help / color / mirror / Atom feed
* Compiling FSF GNAT standalone?
@ 2012-07-28 23:31 Patrick
  2012-07-29  0:05 ` Patrick
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick @ 2012-07-28 23:31 UTC (permalink / raw)


Hello Everyone

I know I can download FSF GNAT integrated into GCC

http://www.gnu.org/software/gnat/

But is there a way to download it and build it as a separate application?



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

* Re: Compiling FSF GNAT standalone?
  2012-07-28 23:31 Compiling FSF GNAT standalone? Patrick
@ 2012-07-29  0:05 ` Patrick
  2012-07-29 11:11   ` Simon Wright
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick @ 2012-07-29  0:05 UTC (permalink / raw)


Sorry for answering my own post, as per usual, I can't form a short sensible question :(

So it's my understanding that CC, G++, GNAT etc cannot take source down to an executable by themselves so they are not standalone compilers but frontends to the GCC back end(depending on how you interpret the word compiler).

An earlier thread had mentioned that gnatpp was not available in GCC, so I thought I would compile GNAT on my own to see if there was a bug in it.

If I call gnatmake, it will call GCC eventually, so I supposed the term freestanding GNAT is false. However if I call gnatpp then it is not going to call GCC and there is no way to call gnatpp from GCC so I guess GNAT is not completely dependent on GCC. I would like to build GNAT from source to be able to call gnatpp. I thought it would also be interesting to try to compile it with a cross compiler so that it could be used on other architectures.



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

* Re: Compiling FSF GNAT standalone?
  2012-07-29  0:05 ` Patrick
@ 2012-07-29 11:11   ` Simon Wright
  2012-07-29 12:17     ` Patrick
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Wright @ 2012-07-29 11:11 UTC (permalink / raw)


Patrick <patrick@spellingbeewinnars.org> writes:

> If I call gnatmake, it will call GCC eventually, so I supposed the
> term freestanding GNAT is false. However if I call gnatpp then it is
> not going to call GCC and there is no way to call gnatpp from GCC so I
> guess GNAT is not completely dependent on GCC. I would like to build
> GNAT from source to be able to call gnatpp. I thought it would also be
> interesting to try to compile it with a cross compiler so that it
> could be used on other architectures.

gnatpp is an application written in Ada using AdaCore's ASIS
implementation.

GNAT's ASIS is (a) a library which provides access to information about
source programs which can be output by the front-end of the GNAT
compiler, (b) a set of tools built to use ASIS to allow various kinds of
processing on source programs. gnatpp is one of these.

gnatpp's source is not part of the GCC source tree, ie not part of FSF
GCC, any more than GNAT ASIS is. You have access to the source for both
as part of the GNAT GPL distribution: look under ASIS. You ought to be
able to build GNAT GPL 2012 ASIS (library and tools) using the GNAT GPL
2012 compiler.

The compiler and ASIS are highy coupled, so building GNAT GPL 2012 ASIS
using the Debian compiler suite requires workrounds (I wrote about this,
for Mac OS X & GCC 4.6, at [1]); but I see that Debian 6 has various ASIS
packages, including asis-programs, which includes gnatpp.

gnatpp is not called from GCC. It can be called from GPS (again, not
part of GCC).

[1] http://forward-in-code.blogspot.co.uk/2011/10/building-asis.html



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

* Re: Compiling FSF GNAT standalone?
  2012-07-29 11:11   ` Simon Wright
@ 2012-07-29 12:17     ` Patrick
  2012-07-29 13:43       ` Ludovic Brenta
  2012-07-29 14:08       ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: Patrick @ 2012-07-29 12:17 UTC (permalink / raw)


Hi Simon

Thanks very much for your post, it fills in a lot.

After reading an old thread, AdaCore ... the Next SCO?, I am afraid to download anything from Adacore's site. It seems to me that using only the FSF version will give me some layer of protection against a potential patent troll.

Your website has a lot of good information, thanks again for posting about this.

As you were saying there are effectively 3 different release schedules for GNAT, all out of sync. And as you were saying it looks like Adacore makes commits directly to FSF.

If I install gnat with apt-get, then I have gnatpp(with bug) called through GNAT and I can call gnatmake directly on a file too. If I install GCC, I don't get Ada in the vanilla package but if GNAT is also installed I have GCC + Ada. If I call gcc with the right flags then I can compile a file and release the code under whatever license I want but if I call gnatmake can I still release it under whatever license I want? If the gnatmake is being called from a Adacore GPL package then I can't right? If vanilla GCC is not equipped with GNAT but is after GNAT is installed, is the installation process installing a totally new version of GCC or is GCC still calling Adacore's GPL only GNAT somewhere in the process?

I am so confused! If the bloody DOD had of commissioned a free Ada compiler back at the start, the mandate would have had teeth and the programming world might not have been so centred around C.

I am finding the licensing situation around Ada a total pain the the ASIS!



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

* Re: Compiling FSF GNAT standalone?
  2012-07-29 12:17     ` Patrick
@ 2012-07-29 13:43       ` Ludovic Brenta
  2012-07-29 14:08       ` Simon Wright
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Brenta @ 2012-07-29 13:43 UTC (permalink / raw)


Patrick <patrick@spellingbeewinnars.org> writes:
> I am so confused! If the bloody DOD had of commissioned a free Ada
> compiler back at the start, the mandate would have had teeth and the
> programming world might not have been so centred around C.
>
> I am finding the licensing situation around Ada a total pain the the
> ASIS!

In case you haven't aready, read the Debian Policy for Ada; it explains
"all there is to know about Debian and Ada" including these licensing
issues.  By the way, ASIS is pure GPL only and has always been.  The
reason is also explained in that document.

http://people.debian.org/~lbrenta/debian-ada-policy.html

(I've just published the Sixth Edition mentioning the release of GNAT
GPL 2012.)

-- 
Ludovic Brenta.



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

* Re: Compiling FSF GNAT standalone?
  2012-07-29 12:17     ` Patrick
  2012-07-29 13:43       ` Ludovic Brenta
@ 2012-07-29 14:08       ` Simon Wright
  2012-07-29 15:34         ` Patrick
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Wright @ 2012-07-29 14:08 UTC (permalink / raw)


Patrick <patrick@spellingbeewinnars.org> writes:

> If I install gnat with apt-get, then I have gnatpp(with bug) called
> through GNAT and I can call gnatmake directly on a file too. If I
> install GCC, I don't get Ada in the vanilla package but if GNAT is
> also installed I have GCC + Ada. If I call gcc with the right flags
> then I can compile a file and release the code under whatever license
> I want but if I call gnatmake can I still release it under whatever
> license I want? If the gnatmake is being called from a Adacore GPL
> package then I can't right? If vanilla GCC is not equipped with GNAT
> but is after GNAT is installed, is the installation process installing
> a totally new version of GCC or is GCC still calling Adacore's GPL
> only GNAT somewhere in the process?

If you don't download & install GNAT GPL from libre.adacore.com, your
Debian installation is using FSF GCC.

gnatmake is a tool used during the build, and has no impact on the
copyright status of any executables you may build with it; in this
context, the only things to worry about are the libraries you use.

One set of libraries is the ADA RTS, necessary to run any Ada program;
this is the part of GNAT GPL that you need to be wary of (the compiler
itself is GCC, but the result of using the compiler isn't; the thing is,
the compiled code relies on the RTS).

If you use any other libraries, you need to think about their licenses
too. Many libraries come with licenses which allow you to distribute
proprietary programs without distributing source - for example,
TclAdaShell[1]. Others, such as ASIS, are full GPL.

[1] https://sourceforge.net/projects/tcladashell/



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

* Re: Compiling FSF GNAT standalone?
  2012-07-29 14:08       ` Simon Wright
@ 2012-07-29 15:34         ` Patrick
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick @ 2012-07-29 15:34 UTC (permalink / raw)


Thank you Ludovic, thank you Simon

This should clear things up for me along my learning curve for the next few months. 

There are all sorts of resources on the net about programming with Ada. It will be years before I will be able to offer anything helpful(in terms of syntax and semantics) to new users that isn't already explained better somewhere else but I think the Ada toolchain world could really use more tutorials.

I could probably post something useful about mixing C and Ada(in particular shared C libraries). I could probably write something useful about the state of baremetal programming and RTOS programming with Ada and and I can now explain much of the licensing issues, which I have found extremely confusing confusing.

Thanks again




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

end of thread, other threads:[~2012-08-01  2:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28 23:31 Compiling FSF GNAT standalone? Patrick
2012-07-29  0:05 ` Patrick
2012-07-29 11:11   ` Simon Wright
2012-07-29 12:17     ` Patrick
2012-07-29 13:43       ` Ludovic Brenta
2012-07-29 14:08       ` Simon Wright
2012-07-29 15:34         ` Patrick

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