home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20701 < prev    next >
Encoding:
Text File  |  1993-01-05  |  6.8 KB  |  142 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!paladin.american.edu!news.univie.ac.at!chx400!bernina!bernina!neeri
  3. From: neeri@iis.ethz.ch (Matthias Neeracher)
  4. Subject: Re: Sozobon (or other free C's): would this strategy work?
  5. In-Reply-To: bobf@flint.geology.yale.edu's message of Tue, 5 Jan 1993 02:32:37 GMT
  6. Message-ID: <NEERI.93Jan5193849@iis.ethz.ch>
  7. Sender: news@bernina.ethz.ch (USENET News System)
  8. Organization: Integrated Systems Laboratory, ETH, Zurich
  9. References: <29879@castle.ed.ac.uk> <1993Jan5.023237.18823@cs.yale.edu>
  10. Distribution: comp
  11. Date: Tue, 5 Jan 1993 18:38:49 GMT
  12. Lines: 128
  13.  
  14. [comp.sys.atari.st.tech dropped from newsgroups]
  15. In article <1993Jan5.023237.18823@cs.yale.edu>, bobf@flint.geology.yale.edu (Bob Fischer) writes:
  16. > J R Evans (ngse18@castle.ed.ac.uk) wrote:
  17. > : 
  18. > : I week or so back, I offered the suggestion that it might be a
  19. > : reasonably modest task to convert Sozobon C (a fairly small K&R C for
  20. > : the Atari) to work on the Mac.  There has been some follow-up
  21. > : discussion....
  22. > : Sink (author of Harvest C) and Brad Pickering.  Eric and I have had an
  23. > : interesting discussion by email, and I have received helpful comment
  24. > : from a number of others.  My thanks to all who have corresponded, and
  25. > : particularly to Eric.
  26. > : 
  27. > : I have given the possibility quite a bit of thought, read some relevant
  28. > : documentation, and come up with a strategy which I would like to
  29. > : share with you, by which this might be achieved reasonably rapidly.
  30. > : I invite your comments.  Although I discuss the strategy in terms of
  31. > : Sozobon C as the target for transport, it could also be used with any
  32.  
  33. > The outlined strategy may work, but I'm not so sure it's a good idea.
  34. > If I were going to port a C to the Mac, I'd do GNU C, and port it "the
  35. > right way".
  36.  
  37. I agree.
  38.  
  39. > Sure it's huge, but as you said, memory on the Mac isn't
  40. > such a big deal anymore.  The smallest Mac you can buy nowadays is 2
  41. > Mbytes, more than adequate for GCC.
  42.  
  43. Not necessarily. The executable for gcc is already almost 2M on a '386 and even
  44. bigger on other architectures. The gcc 1.37 port for MPW needed about 3.5M, if
  45. I recall correctly. Anyway, I think it can be made to run in 4M and that might
  46. be satisfactory.
  47.  
  48. > My reasons for this assessment 
  49. > follow:
  50.  
  51. > * GCC runs on many systems, including a zillion flavors of UNIX,
  52. > MS-DOS, and the Atari ST.  Therefore, a program written in GCC is more
  53. > likely to work on other systems than a program developed with _any_
  54. > other C compiler (like, say, SUN's compiler, or Mark Williams C).  A program
  55. > written with one GCC need only be compiled by another GCC to provide an
  56. > easy port.  Potential problems of hidden compiler incompatibilities
  57. > between systems are eliminated.
  58.  
  59. True, but there remain enough *real* incompatibilities between a Mac and UNIX
  60. that this won't ever become an issue.
  61.  
  62. > * GCC is backed by the Free Software Foundation.  This is not a
  63. > program which will lose support when one or two people taking care of
  64. > it decide to do something else. [...]  The FSF [...] is dedicated to
  65. > bringing a full UNIX-compatible system to everyone [...]
  66.  
  67. Everyone but Macintosh users, that is. The FSF's conditions for lifting their
  68. ban on Macintoshes won't be accepted by Apple, and even if the boycott is
  69. lifted, don't expect the FSF to ever actually do active support for the Mac.
  70.  
  71. This is not as much an issue as it might seem, since gcc for UNIX is here to
  72. stay and you can always progress from there and the FSF clearly doesn't claim
  73. that porting their software to the Mac is illegal.
  74.  
  75. > [...] the
  76. > GNU project compiles most reliably with GCC.  This includes re-makes
  77. > of programs like make, yacc, lex, sh, to name a few.  GNU project
  78. > programs not part of standard UNIX include a full PostScript
  79. > interpreter.)
  80.  
  81. Almost all reasonably sized GNU tools have been ported to both MPW and Think C,
  82. (including an avalanche of Ghostscript ports lately :-), so providing gcc
  83. probably won't provide that much of a benefit. Additionally, porting problems
  84. tend to be in the library and the user interface rather than the C dialect.
  85.  
  86. > * Finally, the most compelling reason is that I think that GCC would
  87. > be the easiest to port!  GCC was written in a modular way, so that it
  88. > can be ported to any system, running any instruction set. [...] 
  89. >  To encourage people to port GCC, Richard Stallman
  90. > (author of GCC) has written a 190-page manual describing in detail how
  91. > to port GCC.  I don't believe any other program comes with such
  92. > carefully written porting instructions.
  93.  
  94. All of this is true, but don't underestimate the difficulties anyway. There is
  95. a quite instructive paper on porting gcc 1.37 to MPW on
  96. ftp.ugcs.caltech.edu:pub/topsoft/misc/gccport.cpt.hqx (Unfortunately, I can't
  97. remember the author right now, it might have been Stan Shebs). 
  98.  
  99. > * And last but not least, GCC is not just a C compiler.  It consists of
  100. > a front end, to parse programs, and a back end, to generate code.  GCC
  101. > version 2 includes C++.  The FSF is working on implementations of
  102. > FORTRAN and other languages, all which use the GCC back end.  So the
  103. > effort into porting GCC results in two languages ported today and
  104. > potentially many in the future.
  105.  
  106. Absolutely correct (I believe there is even Objective C available today).
  107.  
  108. > I hope that GCC will see the light of day on the Mac.
  109.  
  110. So do I (but I don't think I will do anything about it :-).
  111.  
  112. > Since the Mac
  113. > is not really a hacker's computer, few people have shown an interest
  114. > in porting it.
  115.  
  116. I don't think that's the reason. Lots of other hacker's tools have been ported,
  117. but gcc and emacs are just rather big programs and the Mac is not particularly
  118. UNIX compatible (gcc and emacs *are* available under A/UX, which sort of proves
  119. my point). Another reason against porting gcc is that there are already at
  120. least two powerful, well-integrated compilers around. I doubt that you could
  121. get gcc to compile even as fast as MPW C, let alone Think C, especially if you
  122. consider that gcc needs a separate assembly step. If you add the necessity of
  123. writing a decent user interface for a standalone compiler, I doubt that people
  124. will be willing to spend a lot of effort in writing the 3rd fastest and 3rdmost
  125. compatible C compiler for the Mac (If anybody *is* willing, though, I applaud
  126. his dedicationand he might get famous).
  127.  
  128. > But I think a lot of people would benefit from a port,
  129. > given the large numbers of Mac users.
  130.  
  131. My parents use Macs, too, but I doubt they would benefit from a port.
  132. Seriously, though, I think the target audience is not that big. gcc is too big
  133. for amateur programmers, too slow for many non-amateurs, and some programmers
  134. wouldn't like to use a standalone compiler (I want my MPW :-).
  135.  
  136. Matthias
  137.  
  138. -----
  139. Matthias Neeracher                                      neeri@iis.ethz.ch
  140.   "I wouldn't recommend sex, drugs or insanity for everyone, but
  141.    they've always worked for me." -- Hunter S. Thompson
  142.