[comp.sys.dec] g++ 1.37.1 on the decstation

johns@calvin.spp.cornell.edu (John Sahr) (07/18/90)

I recently posted a note to this group that I had succeeded in getting
g++-1.37.1 to work on the decstation.  Several people asked for diffs
and explanations, but about half my replies bounced.  Here is the text
of my response to one query.

(Ultrix 3.1, 12 Mbyte)
...I'm happy to supply the changes I made, though.  You do need gcc
1.37.1, of course.  Fortunately, it installs completely without a
hitch, as usual (quite an accomplishment).

First, get g++ 1.37.0 and the patch to bring it up to 1.37.1, (and
apply the patch).  Second, create the various links described in the
README, run congif.g++ decstation, etc.  Then apply the Makefile
patch; this isn't a bug fix, it is just the result of my editing the
Makefile to configure it for the decstation.

After applying this patch, you will probably want to make sure that
the Makefile installation paths are set up for what you want.

Now type "make".  The make will chug along for quite a while, but will
eventually stop when it attempts to compile aux-output.c.  There is a
declaration conflict from an include file, which I corrected by just
commenting out the declaration from aux-output.c, relying upon the
existing extern declaration from tree.h.  Without really understanding
the problem, this seems to fix it.  Unfortunately, you have to do the
patch in two steps, because aux-output.c doesn't exist until after the
make starts.  I'm not really sure where it comes from---so I patch
when make fails.

After applying this patch, type "make" again, and it should go to
completion.  I didn't have to do anything to it after the aux-output.c
patch.  I did compile up libg++, and it went just fine.

%%%%%%%%%%%%%%%%%% apply this patch to Makefile %%%%%%%%%%%%%%%%%%%%
41c41
< COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF -DNO_UNDERSCORES
---
> # COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF
49c49
< CFLAGS = -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/
---
> CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/
323c323
< CRT1_COMMAND=$(CC) -Um68k -c $(INCLUDES) crt1.c
---
> CRT1_COMMAND=$(CC) -Um68k -g -c $(INCLUDES) crt1.c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%% apply this patch to aux-output.c after the Make halts %%%%%%%%%%%
467,468c467
< /* the following line conflicts with a declaration in tree.h */
< /* extern char *tree_code_name[]; */
---
> extern char *tree_code_name[];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Good luck,

-john  (607 255 8298)

John Sahr,                   | Electrical Engineering - Space Plasma Physics
johns@alfven.spp.cornell.edu | Cornell University,         Ithaca, NY  14853
-- 
John Sahr,                   | Electrical Engineering - Space Plasma Physics
johns@alfven.spp.cornell.edu | Cornell University,         Ithaca, NY  14853