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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3fc79ad704f81a40 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-07 15:28:15 PST Path: bga.com!news.sprintlink.net!uunet!in1.uu.net!world!zilker.net!convex!bcm!news.msfc.nasa.gov!news.redstone.army.mil!news From: jmj@redstone.army.mil (Mark Johannes) Newsgroups: comp.lang.ada Subject: Re: Writing a Mac Ada compiler Date: 7 Mar 1995 21:31:26 GMT Organization: U.S. Army Missile Command, RD&E Center Message-ID: <3jijbe$q7b@michp1.redstone.army.mil> References: <3ji8rc$rj8@nic.umass.edu> Reply-To: jmj@redstone.army.mil NNTP-Posting-Host: merlin.gcs.redstone.army.mil Date: 1995-03-07T21:31:26+00:00 List-Id: In article <3ji8rc$rj8@nic.umass.edu>, cons116@twain.oit.umass.edu (Mike White) writes: >Arthur Evans Jr (evans@evans.pgh.pa.us) wrote: > >: If you have time on your hands and want to address this problem, port >: GCC 2.6.3 to the Mac, and then bootstrap GNAT. That's a much more >: modest task and will result in a first class compiler. > Amen... >Would it really be that much easier to port it? Have you seen the source >code? I haven't, so I am wondering how well designed/documented it is. >I realize it's a pretty big task, but 10+ man-years? O.K. I'll admit >it's probably not a one-man project, but if others were interested in >working on such a project... > Yes you would have to learn something about the internals of GCC but you would not have to write the large mass of code known as a compiler. Unless I am horribly off base here, your effort would focus on providing host configuration files and host specific code. Since both the m68k and PowerPC families are well covered by GCC/GNAT. > I mean seriously, I wrote a simple lexer and parser (both using Ada >by the way) in my systems class both in a semester. Both of these >were easily extensible for large projects, and the grammar >for Ada is widely available. Beyond that, converting to machine code >would seem my biggest problem, never having done mac or powermac assembly. >Interfacing with mac system calls seems pretty basic since they are well >defined. I imagine one would convert the parameter conventions from Ada >to the system via MacHeaders. yes a lexer and parser may not be too tough for you to develop but.. you need 2 code generators, linkers, assemblers, debuggers, and Ada runtime support to have a full environment. Again your effort should be restricted to providing MAC specific support. -- not reinventing the wheel. I personally don't relish the idea of even using the machine_code package much less implementing it. > Just some thoughts. I need to do some more research obviously before >making any attempt. Anyone interested in participating on a joint effort, >either working from scratch or doing a port? Please reply here so that >everyone interested can read it, myself included. > >mike white And let's not forget this issue: support and maintenance. The GNU tools have a lot of users. There is a large body of code shared between the C, Ada, Pascal, and now Fortran users. This significantly increases the user population for the toolset. Yes the port itself may only have a handful of users..but the code generator and other support components are shared and have who knows how many users. So the odds of finding bugs at a serious level are significantly reduced. Finally, a port of GNU Ada gives a lot more to the MAC community than an Ada compiler. It lays (all??) of the groundwork for ports of other GNU languages and gets enough tools in place to allow ports of other GNU tools. Wouldn't GNU C work when/before GNAT did? C++, Objective-C, Fortran, and Pascal would not be far behind. it starts as a trickle of tools and ends as the Hurd .. (sorry could not resist). I probably missed something... but you get the idea. Joel Sherrill jsherril@merlin.gcs.redstone.army.mil