From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bc3d3f333a02de0f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!i42g2000cwa.googlegroups.com!not-for-mail From: "Ludovic Brenta" Newsgroups: comp.lang.ada Subject: Re: Compiling GNAT GPL 2006 into GCC 4.1.1 Date: 9 Aug 2006 01:11:29 -0700 Organization: http://groups.google.com Message-ID: <1155111089.285711.117450@i42g2000cwa.googlegroups.com> References: <1155109642.527022.65820@75g2000cwc.googlegroups.com> NNTP-Posting-Host: 212.190.145.10 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1155111094 25166 127.0.0.1 (9 Aug 2006 08:11:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Aug 2006 08:11:34 +0000 (UTC) In-Reply-To: <1155109642.527022.65820@75g2000cwc.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.6) Gecko/20040116,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 SEVPXS01 Complaints-To: groups-abuse@google.com Injection-Info: i42g2000cwa.googlegroups.com; posting-host=212.190.145.10; posting-account=ZjNXewwAAADyBPkwI57_UcX8yKfXWOss Xref: g2news2.google.com comp.lang.ada:6094 Date: 2006-08-09T01:11:29-07:00 List-Id: 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.