GNU stuff on the mac

Richard Michael Todd rmtodd at uokmax.UUCP
Thu May 25 12:43:55 AEST 1989


In article <417 at wizard.UUCP> john at wizard.UUCP (John Danner) writes:
<I am in the enviable position of trying to get g++ and gdb+ to work on
<several of the computers around here so that my C++ code meets a more
<acceptable definition of portable.  I have heard that under A/UX 1.0 
<some of the GNU programs were distributed with the OS.  I am looking for
<the set of mac-specific configuration files to make things compile on a 
<mac.  I doubt using the m68k files will cut it.  If you have these files
<or even some guesses at mac-specifics which probably would need to go
<in these files, please let me know.
 The only GNU program distributed with A/UX was GNU Emacs.  There are config
files there for A/UX (actually, for the pre-release version codenamed
"Oreo", the config file is, I think, tm-oreo.h).  However, this won't help
you much for GCC, G++, etc., because the compilers et al need a *lot* more
specific detail about the machine, its assembler, etc.  Much of the 
nastiness in configuring GCC for various 680x0 machines seems to be coping
with assembler differences/bogosities.  
  In addition, there are some rather serious problems involved in getting
GCC to compile on A/UX. (I've been working off and on on getting GCC1.34
to work on my system, so I know whereof I speak).  The problem is that the
table sizes in the compiler, even in the /usr/lib/big version, are just too
frigging small.  Several of the files cause cpp to blow its tiny little mind
with "too many #defines".  Fortunately, none of these files are used in 
GNU cpp, so one can perform minor surgery on the makefile to build GNU cpp
first, then use it to compile the offending files.  Also, in reload.c, a 
collection of really horrible nested macros (from tm-m68k.h) cause an 
expression so complex that cc1 runs out of space; the fix there is to hack
out some of the macros from tm-m68k.h, convert them to functions, and put them
in a separate file (I call mine AUXbdamage.c, for obvious reasons :-).  Once
you diddle that, then you can compile GCC. Getting it to produce suitable
assembler code is harder work; I haven't finished that part yet.  The A/UX
assembler appears to be a relative of the SGS assembler that is used on the
3b1; it isn't close enough so that you can just use tm-3b1.h, however.  Still
that's probably the best place to start.
   The Gnu Assembler seems to compile on A/UX with no problems and only minor
hacking; I haven't tested it much, though.
   The GNU binary utilities compile with minor hacking and seem to work; at 
least, I can create object files with the A/UX cc, convert the  .o file and
libc.a to GNU format, and link them to produce a working a.out file.  I'm
using the COFF-encapsulation, even though according to John Gilmore this
isn't necessary; A/UX has the capacity to run BSD/GNU style object files. 
This is an undocumented feature; I don't know if it still exists in 1.1.
(Presumably they wouldn't have bothered to take it out, but who knows...)
-- 
Richard Todd	Fido:1:147/1     USSnail:820 Annie Court,Norman OK 73069
Try one of these: rmtodd at chinet.chi.il.us, rmtodd at killer.dallas.tx.us,
   rmtodd at uokmax.ecn.uoknor.edu  or ...!sun!texsun!uokmax!rmtodd.
"MSDOS is a Neanderthal operating system" - Henry Spencer



More information about the Comp.unix.aux mailing list