home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / bsd / 5449 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  3.9 KB

  1. Xref: sparky comp.unix.bsd:5449 comp.unix.sysv386:14272
  2. Newsgroups: comp.unix.bsd,comp.unix.sysv386
  3. Path: sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!fmsrl7!lynx!umn.edu!kksys.com!quest!digibd!dellr4.digibd.com!rhealey
  4. From: rhealey@dellr4.digibd.com (Rob Healey)
  5. Subject: Re: gcc as primary SVR4 port compiler
  6. Organization: DigiBoard Incorporated, Eden Prairie, MN
  7. Date: Wed, 09 Sep 1992 21:52:42 GMT
  8. Message-ID: <1992Sep09.215242.19348@digibd.com>
  9. References: <PHR.92Aug15214245@soda.berkeley.edu> <YSDIBS4@taronga.com> <PCG.92Aug27152230@aberdb.aber.ac.uk>
  10. Sender: @digibd.com
  11. Lines: 67
  12.  
  13. In article <PCG.92Aug27152230@aberdb.aber.ac.uk>, pcg@aber.ac.uk (Piercarlo Grandi) writes:
  14. |> Kelly> It would be a strange to build SVR4 with gcc.  Commodore probably
  15. |> Kelly> started out with a Motorola development system running SVR4, and
  16. |> Kelly> a big pile of sources.  They would have then hacked and
  17. |> Kelly> cross-compiled a development environment that would run on the
  18. |> Kelly> Amiga 2500 and 3000.
  19. |> 
  20.     Since I'm an ex beta tester and have an Amiga 2.1 SVR4 system at
  21.     home I can fill in a few holes.
  22.  
  23.     1) AmigaUNIX is derived from the 3b2, yup you read that right,
  24.       SVR4.0 source. The 2.x versions are 100% gcc 1.41 compiled
  25.       minus some minor utils outside the kernel. gcc 1.40.1 was HEAVILY
  26.       hacked to generate ELF/DWARF assembler output. Alot of work
  27.       was adaptation of Ron Guillmette's(sp) m88k SVR4 gcc work.
  28.       AmigaUNIX DID use the AT&T m68k version 5 compiler but only
  29.       long enough to get a decent version of gcc functioning.
  30.  
  31.     2) They had a functioning SVR3.2 port from which the SVR4 port
  32.        was bootstrapped. Most of the Amiga specific code written for
  33.        SVR3.2 was easily moved over to the SVR4 port. 2.1 AmigaUNIX
  34.        has had all the kernel code, minus an ST506 hard drive driver,
  35.        converted to SVR4 standards.
  36.  
  37.     3) gcc 2.x can be used on AmigaUNIX but there are subtle differences
  38.        in the 2.x vs 1.4x gcc code generation that cause them to
  39.        not work when you mix and match, call stack frames are
  40.        slightly different I think. As long as the whole app is
  41.        compiled with the same compiler you should be OK. The system
  42.        librarys seem to link OK with either version.
  43.  
  44.     4) No Motorola specific SVR4 port was ever looked at, only the 3b2 code,
  45.        although the headers agree, more or less, to the m68k source
  46.        API. Since there were no other major SVR4 m68k ports at the
  47.        time no real effort was made to strictly conform to the m68k
  48.        ABI although it SHOULD pretty much work. The SVR3.2 compatability
  49.        stuff was left out as there was no SVR3.2 that could run on
  50.        the Amiga.
  51.  
  52.        Offhand I would say that with the ELF/DWARF support in gcc 2.x
  53.        it SHOULD be possible to uses gcc as a primary compiler. There
  54.        are two patch files for 2.2.2 which allow gcc to handle
  55.        weak and pack pragmas on m68k SVR4 systems and to properly generate
  56.        16 and 32 bit pc relative code for dynamic librarys. The Intel
  57.        SVR4 code looks like it can already do this.
  58.  
  59.     5) The speed difference between AT&T m68k CGS compiled code and gcc
  60.        1.4 is AMAZING. Looking at the assembly output of gcc vs
  61.        /usr/ccs/bin/cc reveals that the version 5 m68k AT&T compiler
  62.        was written by somebody who SERIOUSLY lacked knowledge about the
  63.        m68k architecture, it is DAMN UGLY m68k code and wastes ALOT of
  64.        cycles for no good reason.
  65.        
  66.        gcc on the otherhand generates some VERY nice m68k code. If the
  67.        Atari people did port SVR4 I sincerly hope they used gcc and not
  68.        the AT&T compiler or their code will take a MAJOR performance hit...
  69.        AmigaUNIX easily sped up by at least 2x switching from AT&T to
  70.        gcc.
  71.  
  72.        Only the AT&T assembler is still in use on AmigaUNIX and BOY does it
  73.        have some WEIRD quirks...
  74.  
  75.        Overall, I'd say gcc 2.x would make a decent compiler for
  76.        SVR4 as long as your version has the support for pragmas,
  77.        pc relative code and the GOT/PLT stuff.
  78.  
  79.         -Rob
  80.