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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,702da61d55762f7b X-Google-Attributes: gid103376,public From: Chris Morgan Subject: Re: GNAT for an unsupported Unix-system? Date: 1997/11/15 Message-ID: <87zpn5666i.fsf@mihalis.i-have-a-misconfigured-system-so-shoot-me>#1/1 X-Deja-AN: 289777593 Sender: cm@mihalis References: <618.253T1150T10101574@cs.tu-berlin.de> Organization: Linux Hackers Unlimited X-NETCOM-Date: Sat Nov 15 12:19:40 PM PST 1997 Newsgroups: comp.lang.ada Date: 1997-11-15T12:19:40-08:00 List-Id: "Tor-Einar Jarnbjo" writes: > I recently downloaded the source-codes for the latest GNAT Ada-compiler, > but then I saw that I needed the last version of GNAT to compile the > new version of GNAT. Well, this results in an interesting problem when > trying to port GNAT to a Unix-system for which there are no binaries. You can build a cross-compiler easily enough for almost every known Unix variant (and all important ones). That's how the existing ports get done. I think GNAT started off life on SunOS and OS/2 and all the other versions started off life as cross-compiles. > Does anyone have a suggestion on how to solve this? E.g. BinProlog is > written in Prolog, but has a small part written in C, making it possible > to compile enough of the compiler with gcc, to make it able to compile > itself. Is there a similar do-magic-thingy for GNAT, or perhaps another > free Ada-compiler written in C? There was a discussion about this on this very newsgroup a while back. I suggested a subset language Tina (Tina Is Not Ada) which contained just the features that the GNAT compiler itself needs and which could be translated to C for the bootstrap problem. I even speculated that this translation could be aided by a hacked GNAT front-end which could traverse the tree representation of the compiler and emit the C. Robert Dewar replied (as I remember) that they considered schemes like this originally but found cross-compiling to be a far better solution. Regards, Chris -- Chris Morgan