comp.lang.ada
 help / color / mirror / Atom feed
* Compiling GNAT GPL 2006 into GCC 4.1.1
@ 2006-08-09  7:47 deadlyhead
  2006-08-09  8:11 ` Ludovic Brenta
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: deadlyhead @ 2006-08-09  7:47 UTC (permalink / raw)


This is my first attempt at actually compiling GNAT, so I'm coming here
for any insight into the process.

I'm currently using a non-Ada GCC 4.1.1 and would really like to get
GNAT up and running so I can start developing in my favorite language
again.  (My GNU/Linux box is based on Linux From Scratch, and it's only
been recently that I've been able to acquire the GNAT sources to set up
a _real_ compiler.)  Like any good technophile, I would really like to
use the latest GNAT sources from AdaCore as I'm eager to utilize the
new features from the Ada 2005/2006 standard.  Herein lies the
problem...

AdaCore only provides information on building their release sources
into the 3.4.6 series GCC release, with absolutely no information on
the 4.x series of compilers.  The sane route is likely to say,
``Alright, I'll just go ahead and use GCC 3.4.6 for GNAT and 4.1.1
otherwise,'' but I really can't stand the thought of having two GCC
builds around like that, where I could instead have a beautifully
integrated environment.  On top of that, I hate the thought of being
forced to use obsolete technology, either an old GCC or Ada95 when an
Ada 2005/2006 compiler is available.

Now, normally I'd just go for it, replacing files in the GCC tree with
the AdaCore files where necessary (ada directory, etc), however there
are specific .dif files and such provided for the 3.4 GCC which most
assuredly do not work with GCC 4.1.1.  As I imagine this could create
serious problems, I'm hesitant to just give it a go.

I'd like to know if anyone on this list has attempted integrating GNAT
GPL 2006 into their GCC 4.1.1 builds, and if so, were they successful?
Is there any information regarding the matter available on the web?
(Extensive searching of this news group as well as much Googling have
proven somewhat fruitless.)  Does anybody know of any attempts by the
GCC team to integrate GNAT 2006 sources into GCC in the near future
(possibly series 4.2)?

I'll be posting to the GCC lists tomorrow with queries, and likely will
simply give GNAT 2006/GCC 4.1.1 a shot if nobody has any information on
the matter.  Thanks to anybody willing to offer up whatever knowledge
they possess.

-- Seth




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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09  7:47 Compiling GNAT GPL 2006 into GCC 4.1.1 deadlyhead
@ 2006-08-09  8:11 ` Ludovic Brenta
  2006-08-09  9:02 ` Stephen Leake
  2006-08-09 16:06 ` Martin Krischik
  2 siblings, 0 replies; 8+ messages in thread
From: Ludovic Brenta @ 2006-08-09  8:11 UTC (permalink / raw)


Merging GNAT GPL 2006 into GCC 4.1.1 is not for the faint of heart.
Even if you've compiled GNAT before, I think it'll take you a lot of
time (months, maybe a year, assuming a hobbyist's schedule) to get this
to work, and there is a high risk of failure. OTOH, such a contribution
would be very welcome, and you would gain a lot of valuable insight on
the internals of GNAT and GCC. Here is roughly how I would do it:

0. Choose a good version control system, and use it throughout!!! (Not
Subversion, as it does not keep track of merges, which you will
absolutely need.)
1. Install the binary GNAT GPL 2006 Edition
2. Install the full GCC 4.1.1 sources, including Ada
3. Build GCC 4.1.1 with Ada, using GNAT GPL 2006 Edition as the
bootstrap compiler
4. Diff GCC 4.1.1 and GCC 4.2's gcc/ada source directories (4.2 is the
trunk, from the FSF's Subversion repo; it already has many features
from GNAT GPL 2006 Edition merged in. The Ada directory is frozen until
the creation of the 4.2 release branch, so it is not a moving target).
5. Backport the GCC 4.2 Ada front-end into GCC 4.1.1, gradually,
recompiling and testing as you go.
6. Diff between GCC 4.2 and GNAT GPL 2006 Edition for any remaining,
unmerged changes
7. Gradually backport these changes into your compiler.

Last time I looked, if memory serves, the unified diff between GCC 4.1
and GNAT GPL 2006 Edition was some 17 megabytes, taking only the Ada
directory into account. Using GCC 4.2 as an intermediate step buys you
a lot of confidence.

The easiest changes you can merge are in the library (e.g.
Ada.Containers), lexical analyser and parser. The trickiest part is the
GiGi (GNAT-to-GNU, the layer that translates GNAT's parse tree into
Tree-SSA for the back-end to process).

-- 
Ludovic Brenta.




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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09  7:47 Compiling GNAT GPL 2006 into GCC 4.1.1 deadlyhead
  2006-08-09  8:11 ` Ludovic Brenta
@ 2006-08-09  9:02 ` Stephen Leake
  2006-08-09  9:58   ` Samuel Tardieu
  2006-08-09 16:28   ` deadlyhead
  2006-08-09 16:06 ` Martin Krischik
  2 siblings, 2 replies; 8+ messages in thread
From: Stephen Leake @ 2006-08-09  9:02 UTC (permalink / raw)


"deadlyhead" <s.brutzman@gmail.com> writes:

> This is my first attempt at actually compiling GNAT, so I'm coming here
> for any insight into the process.

Welcome to the wonderful world of experimental compilation :).

> AdaCore only provides information on building their release sources
> into the 3.4.6 series GCC release, with absolutely no information on
> the 4.x series of compilers.  

I'm an AdaCore paying customer. They are currently conducting a beta
test for GNAT on gcc 4.1. It's pretty broken; I've submitted three
serious bugs so far, and I'm not done running all my tests yet.

> The sane route is likely to say, ``Alright, I'll just go ahead and
> use GCC 3.4.6 for GNAT and 4.1.1 otherwise,'' but I really can't
> stand the thought of having two GCC builds around like that, where I
> could instead have a beautifully integrated environment. 

Integrated, but broken.

Anyway, I thought Linux did a good job of allowing multiple versions
of gcc to coexist? (I use Cygwin on Windows).

> On top of that, I hate the thought of being forced to use obsolete
> technology, either an old GCC or Ada95 when an Ada 2005/2006
> compiler is available.

If the "latest" technology is broken, then the "older" technology is
"current", not "obsolete"!

GNAT-GPL-2006 is based on gcc 3.4.1; it is a pretty complete
implementation of Ada 2005.

> Now, normally I'd just go for it, replacing files in the GCC tree with
> the AdaCore files where necessary (ada directory, etc), however there
> are specific .dif files and such provided for the 3.4 GCC which most
> assuredly do not work with GCC 4.1.1.  As I imagine this could create
> serious problems, I'm hesitant to just give it a go.

I haven't tried it, but you are correct to hesitate.

> I'd like to know if anyone on this list has attempted integrating GNAT
> GPL 2006 into their GCC 4.1.1 builds, and if so, were they successful?

I have not compiled from scratch, but AdaCore has, with the broken
result.

> Is there any information regarding the matter available on the web?
> (Extensive searching of this news group as well as much Googling
> have proven somewhat fruitless.) Does anybody know of any attempts
> by the GCC team to integrate GNAT 2006 sources into GCC in the near
> future (possibly series 4.2)?

I'm sure AdaCore will be integrating their changes once they are done
beta testing, but as usual, they don't advertise a schedule. I would
guess sometime around January 2007.

-- 
-- Stephe



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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09  9:02 ` Stephen Leake
@ 2006-08-09  9:58   ` Samuel Tardieu
  2006-08-09 16:28   ` deadlyhead
  1 sibling, 0 replies; 8+ messages in thread
From: Samuel Tardieu @ 2006-08-09  9:58 UTC (permalink / raw)


>>>>> "Stephen" == Stephen Leake <stephen_leake@acm.org> writes:

Stephen> Anyway, I thought Linux did a good job of allowing multiple
Stephen> versions of gcc to coexist? (I use Cygwin on Windows).

"Linux" is nothing more than a kernel. Some *distributions* may
provide a way for different versions of gcc to coexist. So could a
particular setup on Windows.

  Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/



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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09  7:47 Compiling GNAT GPL 2006 into GCC 4.1.1 deadlyhead
  2006-08-09  8:11 ` Ludovic Brenta
  2006-08-09  9:02 ` Stephen Leake
@ 2006-08-09 16:06 ` Martin Krischik
  2006-08-09 16:40   ` deadlyhead
  2 siblings, 1 reply; 8+ messages in thread
From: Martin Krischik @ 2006-08-09 16:06 UTC (permalink / raw)


Am 09.08.2006, 10:47 Uhr, schrieb deadlyhead <s.brutzman@gmail.com>:

>
> I'd like to know if anyone on this list has attempted integrating GNAT
> GPL 2006 into their GCC 4.1.1 builds, and if so, were they successful?

No - and there is no real need. AdaCore send there patches upstream into  
the subversion trunk directory. So it you realy want it both you need to  
get 4.2.0 and live with the instabilities.

On the other hand the 4.1.1 provides a good balance between stability and  
"latest greatest".

A last Note: The GNU Project [1] is aways on the lookout for more Ada  
package maintainers.

Martin

[1] http://gnuada.sf.net
-- 
Martin Krischik
krischik@users.sourceforge.net



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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09  9:02 ` Stephen Leake
  2006-08-09  9:58   ` Samuel Tardieu
@ 2006-08-09 16:28   ` deadlyhead
  1 sibling, 0 replies; 8+ messages in thread
From: deadlyhead @ 2006-08-09 16:28 UTC (permalink / raw)


Stephen Leake wrote:
> "deadlyhead" <s.brutzman@gmail.com> writes:

> Welcome to the wonderful world of experimental compilation :).
>
> I'm an AdaCore paying customer. They are currently conducting a beta
> test for GNAT on gcc 4.1. It's pretty broken; I've submitted three
> serious bugs so far, and I'm not done running all my tests yet.
>
> Integrated, but broken.
>
> Anyway, I thought Linux did a good job of allowing multiple versions
> of gcc to coexist? (I use Cygwin on Windows).
>
> If the "latest" technology is broken, then the "older" technology is
> "current", not "obsolete"!
>
> GNAT-GPL-2006 is based on gcc 3.4.1; it is a pretty complete
> implementation of Ada 2005.
>
> I haven't tried it, but you are correct to hesitate.
>
> I have not compiled from scratch, but AdaCore has, with the broken
> result.
>
> I'm sure AdaCore will be integrating their changes once they are done
> beta testing, but as usual, they don't advertise a schedule. I would
> guess sometime around January 2007.
>
> --
> -- Stephen

Thanks for the reply!  Sorry to hear you're still using Windows ;-)

Anyway, as far as GNU/Linux allowing multiple versions of GCC, yes,
this is quite possible and common.  However, I've taken the initiative
to compile the entirety of my system from scratch (that is, from the
Linux kernel all the way up to the most obscure utilities), and so I am
managing all software and versioning myself.  This also means that if I
can help it, I'm not going to have multiple versions of programs
hanging around.  ``That way lies madness.''

For completeness reasons (or insanity), I wish to compile GNAT rather
than simply using the binary.  After compiling everything else on my
system, I'm somewhat wary of running software that I didn't type
``make'' to get it working.  Call it a neurosis.

Thanks for the info on AdaCore's current work!  It's encouraging to
know that AdaCore is interested in keeping up with GCC rather than just
focusing on their own product lines.

-- Seth

PS - When you routinely work with development software, the most recent
release is always obsolete!




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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09 16:06 ` Martin Krischik
@ 2006-08-09 16:40   ` deadlyhead
  2006-08-09 18:34     ` Ludovic Brenta
  0 siblings, 1 reply; 8+ messages in thread
From: deadlyhead @ 2006-08-09 16:40 UTC (permalink / raw)


Martin Krischik wrote:
> Am 09.08.2006, 10:47 Uhr, schrieb deadlyhead <s.brutzman@gmail.com>:
>
> No - and there is no real need. AdaCore send there patches upstream into
> the subversion trunk directory. So it you realy want it both you need to
> get 4.2.0 and live with the instabilities.
>
> On the other hand the 4.1.1 provides a good balance between stability and
> "latest greatest".
>
> A last Note: The GNU Project [1] is aways on the lookout for more Ada
> package maintainers.
>
> Martin
>
> [1] http://gnuada.sf.net
> --
> Martin Krischik
> krischik@users.sourceforge.net

Alright, I'm browsing through gnuada.sourceforge.net (great link!
thanks!), but just so I don't get lost, you're saying that AdaCore
routinely sends patches for the latest GNAT into GCC SVN?  Are we
talking active integration, then, of the Ada 2005/2006 standard into
GCC 4.2.x?  That's encouraging, and I wouldn't feel so bad about using
different compilers for the time being if an integrated GCC/GNAT-2006
is on the horizon.

You bring up an interesting course of action as well.  As much as I
hate C/C++, I know I need to improve my skills working with them, and
what better way to accomplish this than hacking on the compiler itself?
 Maybe jumping into GCC 4.2 wouldn't be such a bad thing.

-- Seth




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

* Re: Compiling GNAT GPL 2006 into GCC 4.1.1
  2006-08-09 16:40   ` deadlyhead
@ 2006-08-09 18:34     ` Ludovic Brenta
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Brenta @ 2006-08-09 18:34 UTC (permalink / raw)


deadlyhead writes:
> Alright, I'm browsing through gnuada.sourceforge.net (great link!
> thanks!), but just so I don't get lost, you're saying that AdaCore
> routinely sends patches for the latest GNAT into GCC SVN?  Are we
> talking active integration, then, of the Ada 2005/2006 standard into
> GCC 4.2.x?  That's encouraging, and I wouldn't feel so bad about using
> different compilers for the time being if an integrated GCC/GNAT-2006
> is on the horizon.

Yes, AdaCore merge their sources into the FSF's Subversion repository,
but they don't do it exactly "routinely".  They only merge their
changes during the Stage 1 of the development process, when all
changes are allowed.  During Stage 2, only bug fixes are allowed; they
don't normally have many of those.  During Stage 3, only
release-critical bug fixes (i.e. those for regressions and wrong-code
bugs) are allowed, and Ada bugs are specifically considered never to
be release-critical.

As a consequence, you usually see a large batch of patches in close
succession, during only a couple of months, just after the creation of
a release branch.  The latest such merge happened in january-february
2006 for GCC 4.2.  You can browse the gcc-patches mailing list
archives on http://gcc.gnu.org to see these patches.  The release
branch for 4.2 is still some months away.  After that, I anticipate to
see another slew of patches from AdaCore.

> You bring up an interesting course of action as well.  As much as I
> hate C/C++, I know I need to improve my skills working with them, and
> what better way to accomplish this than hacking on the compiler itself?

The C++ front-end is written in C :) but the Ada front-end is written
in Ada.

> Maybe jumping into GCC 4.2 wouldn't be such a bad thing.

Indeed.

-- 
Ludovic Brenta.



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

end of thread, other threads:[~2006-08-09 18:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-09  7:47 Compiling GNAT GPL 2006 into GCC 4.1.1 deadlyhead
2006-08-09  8:11 ` Ludovic Brenta
2006-08-09  9:02 ` Stephen Leake
2006-08-09  9:58   ` Samuel Tardieu
2006-08-09 16:28   ` deadlyhead
2006-08-09 16:06 ` Martin Krischik
2006-08-09 16:40   ` deadlyhead
2006-08-09 18:34     ` Ludovic Brenta

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