comp.lang.ada
 help / color / mirror / Atom feed
From: "Ludovic Brenta" <ludovic@ludovic-brenta.org>
Subject: Re: Compiling GNAT GPL 2006 into GCC 4.1.1
Date: 9 Aug 2006 01:11:29 -0700
Date: 2006-08-09T01:11:29-07:00	[thread overview]
Message-ID: <1155111089.285711.117450@i42g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1155109642.527022.65820@75g2000cwc.googlegroups.com>

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.




  reply	other threads:[~2006-08-09  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09  7:47 Compiling GNAT GPL 2006 into GCC 4.1.1 deadlyhead
2006-08-09  8:11 ` Ludovic Brenta [this message]
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
replies disabled

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