Building G++ on Pyramid

Jonathan Stone jonathan at beta.isor.vuw.ac.nz
Sun Jun 23 11:58:23 AEST 1991


In article <1991Jun22.145936.14935 at monu6.cc.monash.edu.au> anthony at monu6.cc.monash.edu.au (Anthony Baxter) writes:
>Has anyone had any luck using g++ on a Pyramid? I've managed to get
>it compiled, but it produces assembler with labels like __$_FooBar,
>and the Pyramid as doesnt allow $ as a valid character in a label.
>Has anyone had any luck with this, or could anyone tell me where
>I might begin looking in the code to fix this?
>(btw, its a Pyramid MIS-2/01, running OSx 5.1a-910305)


The short answer is, unfortunately, that it may not be worth your
while trying to get g++ working on a Pyramid.


You don't want to look in the G++ source code to fix this.  The
standard workaround to this problem is to use some character other than '$',
but the Pyramid assembler also rejects that character in labels.
There just aren't any characters to use for this name mangling.

About two years ago there was a modified and unsupported assembler
that allowed '$', in labels, which one could obtain if you asked the
right people.  If you explain your problem to your Pyramid rep, you
may or may not be able to obtain such a thing.


The next thing you will discover is that the GNU loader, gnu-ld, does
not properly link NMAGIC-style .o files.  The Pyramid assembler (at
least on OSx4.n) was the only loader in the known galaxy that produces
NMAGIC .o files by default, so this problem ony affects Pyramid users.
To link these files, which contain entries the Pyramid linker does not
understand, you need either a hack to the g++ driver to run an extra
linker pass to convert the .o files from NMAGIC to ZMAGIC, or a patch
to the GNU loader to make it work with NMAGIC .o files.  I can supply
either of these.


If and when you get a suitable assembler and linker, you will find
that libg++ simply does not work on Pyramids, due to argument passing
incompatibilites.  This will be fixed in gcc 2.0. Until then, there
are patches to support g++ 1.37.1 available from
ftp.isor.vuw.ac.nz:pub/misc.  (1.37.1 was the most recent version when
the Pyramid here was decommissioned).

Enjoy,
--Jonathan



More information about the Comp.sys.pyramid mailing list