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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3fc79ad704f81a40 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-09 21:52:31 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!cmcl2!lab.ultra.nyu.edu!kenner From: kenner@lab.ultra.nyu.edu (Richard Kenner) Newsgroups: comp.lang.ada Subject: Re: Writing a Mac Ada compiler Date: 9 Mar 1995 10:46:03 GMT Organization: New York University Ultracomputer Research Lab Message-ID: <3jmm9b$iav@cmcl2.NYU.EDU> References: <3ji8rc$rj8@nic.umass.edu> <3jlibk$p5g@gnat.cs.nyu.edu> NNTP-Posting-Host: lab.ultra.nyu.edu Date: 1995-03-09T10:46:03+00:00 List-Id: In article <3jlibk$p5g@gnat.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) writes: >As for porting GCC, this is a task that is probably about one twentieth the >effort of writing a compiler, but that too expects you to have significant >experience with GCC and the technology. If you are starting from scratch >and know little about compilers and processor architectures, you have a lot >to learn before you can succeed in such a port. Though true, this is somewhat confusing in the present context. It is indeed the case that doing a port to a new processor architecture requires considerable knowlege about GCC. Theoretically, you can do a port with just the information in "Using and Porting GCC" but in practice you need to know more in order to debug and refine the port. I did the RS/6000 and Alpha ports in about one month each, but I spent many years learning GCC to get that proficient in porting it. If you are extremely knowlegable about compilers and architecture but know nothing about GCC, you can probably get far enough along the learning curve to do a port in about six months, but you have a high probability of getting stuck somewhere in the debugging stage. However, in the case at hand, we are NOT talking about doing a GCC port to a new architecture since GCC has long been ported to the m68k and is also supported on the PowerPC. Here, the major concerns are operating system issues. If the calling sequence used is the same as some other system (a big "if"), you could do the port with essentially no knowlege of GCC internals (if you need calling sequence changes, the amount you'd have to learn depends on the nature of the changes). However, what you do have to be very familiar with is System-7 and, even more importantly, the rest of the toolchain: the assembler and linker. >After all, if it were easy to get a GCC port for the MAC, it would have >been done some time ago. Note that getting a GNAT port once a GCC port is >a MUCH simpler task, probably no more than a couple of person months at most >to get a first attempt. To clarify, this talks about porting to a "foreign" OS like System-7. If you want to port GNAT to a Unix-like (or OS/2-like) system on which GCC is already running, the major task is one of recompilation, which, if you are familiar with basic cross-compilation strategies, can be done in a couple of days, barring surprises (and not worrying about tasking). However, there are some OS dependencies in GNAT beyond that of GCC, so doing the first GNAT port to a new OS can indeed take significantly longer than a few days.