g++ port (and other gnu questions)

Dan Gerson gerson at parc.xerox.com
Thu Sep 13 06:45:37 AEST 1990


Yesterday, I played around trying to get g++ up under A/UX as I thought it would
be fairly simple.  However, it is starting to look a little more complicated
than I thought, so I was wondering if anyone has already done this.  If so,
could you let me know where I can find the files on internet, or maybe mail me a
diff file?

(Also, on a similar subject, does anyone have a version of emacs for aux with
the diffs already installed [yeah yeah, I'm lazy]?  The emacs file on apple.com
is the distribution 18.55 version, not the aux version, making me have to apply
the diff file, I guess manually.  [Currently I'm running the older 18.54 version
since there was a tar file for that on apple.com.]  And neither the new emacs
nor the previous 18.54 version seemed to have gdb converted - has anyone done
this?)

In case nobody else compiled g++, it was pretty trivial to get it to
successfully compile g++ and cc1plus binaries.  However, when it then trys to
use cc1plus to compile ld.c, it blows up horribly.  I pretty much used the
sledge hammer approach to getting it up, so it might be that I simply have some
of the options wrong, or it might be that I do actually have to modify some
modules.  But before I start going into diff files to figure out what needed to
be done to get gcc up, I thought I'd ask to ensure it was necessary.

For the curious among you, here are my notes on what I did using a standard
g++ 1.37.0 distribution with the latest gcc 1.37 from apple.com and the
latest bison (which I simply compiled without problems under A/UX):

Dan Gerson
Xerox Palo Alto Research Center
------

Notes on installing g++ on A/UX 2.0

modified config.g++ to include:
        aux)                            # Mac II running A/UX
                cpu_type=m68k
                configuration_file=xm-aux.h
                ;;
in the machine type case statement (copied from config.gcc).

modified Makefile to add -DYYDEBUG to CFLAGS since otherwise an error
occurs in cplus-parse.y referencing yytname which is undefined unless YYDEBUG
is set.  This appears to be an incompatibility with -DGATHER_STATISTICS.

also uncommented
HAVE_UNISTD_H = -DNO_UNISTD_H
in the Makefile.  Although A/UX does have <unistd.h>, the needed definitions
are under a POSIX conditional.  Rather than defining the POSIX conditional
as being true, it seems better to let g++ do its own definition.

A/UX appears to have USG, so uncommented
USG_STDIO = -DUSG_STDIO
in the Makefile.

Defined:
DIR = /local/gcc/gcc-1.37.aux
in the Makefile so that maketest will work with my hierarchy.

Apple has fcntl.h under /usr/include rather than /usr/include/sys, which
is where g++ expects it.  Created a link.

Apple's <sys/param.h> file doesn't define NBPG and CLSIZE.  Added
#define NBPG 8192
#define CLSIZE 1
to the gcc/config/tm-aux.h file.  Yeah, I know, apple defines getpagesize
in some other header file, but I can clean this up later.

Then pretty much did the standard installation:

setenv DIR /local/gcc/gcc-1.37.aux
make maketest
config.g++ aux
make

Everything seems to work until g++ is compiled and the makefile tries to compile
ld.c.  (which is the first time it tries to use the cc1plus it just made).  At
this point all hell breaks loose, apparently looking like g++'s parser is
broken.



More information about the Comp.unix.aux mailing list