[comp.unix.aux] GNU stuff on the mac

john@wizard.UUCP (John Danner) (05/24/89)

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.

John Danner       Tandem Computers, Inc.
Net: pacbell!tandem!wizard!john@decwrl.dec.com
UUCP:...!decwrl!pacbell!tandem!wizard!john

faulkner@jmullins.harvard.edu (Don Faulkner) (05/24/89)

In article <417@wizard.UUCP> john@wizard.UUCP (John Danner) writes:

Jonh> I have heard that under A/UX 1.0 
Jonh> some of the GNU programs were distributed with the OS.

That would be nice -- then A/UX would come under the GNU Copyleft!! ;-)

--

 Don Faulkner                                       
 Building 1, Room 803
 Harvard University, School of Public Health
 665 Huntington Avenue
 Boston, MA  02115

 ARPA:      faulkner%jmullins@harvard.harvard.edu                
 BITNET:    faulkner@harvard
 Telephone: (617) 732-2297

rmtodd@uokmax.UUCP (Richard Michael Todd) (05/25/89)

In article <417@wizard.UUCP> john@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@chinet.chi.il.us, rmtodd@killer.dallas.tx.us,
   rmtodd@uokmax.ecn.uoknor.edu  or ...!sun!texsun!uokmax!rmtodd.
"MSDOS is a Neanderthal operating system" - Henry Spencer

rmtodd@uokmax.UUCP (Richard Michael Todd) (05/27/89)

In article <2072@internal.Apple.COM> dwb@sticks.apple.com (David W. Berry) writes:
>	If you're looking for gcc support for aux 1.1, you can get
>the necessary changes via anonymous ftp from apple.com.  The same
>changes should work for 1.0 but your mileage may vary.

I tried compiling it under 1.0 last night using the A/UX C compiler.  Didn't
work.  Can you say "too many #defines"?  Yep, this version overflows the 
stupid small-size buffers in cpp just like the 1.34 version I've been messing
with for the past month.  Since evidently David Berry got the thing to compile
on his system, without even having to specify -B/usr/lib/big/, presumably this
stupid buffer size business was fixed in 1.1.  So where's my update disks? :-)
-- 
Richard Todd	Fido:1:147/1     USSnail:820 Annie Court,Norman OK 73069
Try one of these: rmtodd@chinet.chi.il.us, rmtodd@killer.dallas.tx.us,
   rmtodd@uokmax.ecn.uoknor.edu  or ...!sun!texsun!uokmax!rmtodd.

dwb@sticks.apple.com (David W. Berry) (05/31/89)

In article <3267@uokmax.UUCP> rmtodd@uokmax.UUCP (Richard Michael Todd) writes:
>In article <2072@internal.Apple.COM> dwb@sticks.apple.com (David W. Berry) writes:
>>	If you're looking for gcc support for aux 1.1, you can get
>>the necessary changes via anonymous ftp from apple.com.  The same
>>changes should work for 1.0 but your mileage may vary.
>
>I tried compiling it under 1.0 last night using the A/UX C compiler.  Didn't
>work.  Can you say "too many #defines"?  Yep, this version overflows the 
>stupid small-size buffers in cpp just like the 1.34 version I've been messing
>with for the past month.  Since evidently David Berry got the thing to compile
>on his system, without even having to specify -B/usr/lib/big/, presumably this
>stupid buffer size business was fixed in 1.1.  So where's my update disks? :-)

	As should be mentioned somewhere, you must get not only the source
distribution or the diffs, but must also take the binary distribution of
gcc 1.35 (gcc-1.35.aux.bin.Z).  Put the appropriate files in /usr/local/bin
and /usr/local/gnu, make sure /usr/local/bin is on your path, and compile
with CC=gcc.  I'll make sure there is a README.gcc.aux that describes all
this.

Opinions:  MINE, ALL MINE! (greedy evil chuckle)

David W. Berry		(A/UX Toolbox Engineer)
dwb@apple.com		973-5168@408.MaBell		AppleLink: berry1