[gnu.gcc] Getting gcc/g++ 1.35 up under hpux with debugging

cheeks@UUNET.UU.NET (08/13/89)

What I did to get gcc/g++ up on HP9000s300 computers, with debugging info
capabilities turned ON:

The following pertains to gcc 1.35, g++ 1.35.0, hpux 6.[25].

After building all of the GNU binutils and installing them, gcc and g++
both built with little trouble.  When using -g with gcc, it generates 
a -lg on the loader's command line.  I've seen libg.a on Suns, and it's 
just one file with a couple assembler directives in it.  Unfortunately I
was unable to come up with a copy of it, so I made a dummy .o file, which
consisted of nothing but an empty function, ar'd it into a library, and
installed it in the gnu library directory.  

That hack seems to be working fine except for one thing:  when you start
gdb like so:

                gdb application corefile

You get the following when you try to find out where your program dumped core:

(gdb) where
#0  0x0 in _start ()
#1  0x0 in _start ()
(gdb)

I'm guessing that this is caused by lack of a real libg.a.  Any ideas on what
I should do to get around that?  (You CAN get a stack trace if you run
your program under the debugger and it dumps core there.)

I had to build crt0+.o with HP's cc because there was no special case for
an HP with gnu's assembler and I didn't understand the code well enough
to port it.  I may look into that in the future, but for now, this works.
The crt0+.o made with /bin/cc had to be converted with hpxt to link with the
rest of g++.

To get g++ to work on the HP, I had to copy /usr/include/ctype.h to
the g++-include directory.  The BSD-version supplied with libg++ is not
compatible with hpux.  stdio.h had to be heavily hacked upon - again due
to hpux incompatibilites with BSD.  Diffs for that will follow in a message 
to bug-lib-g++, and a fix for newld.c to bug-g++..

bug-gnu-utils will will receive a patch for ar.c and a suggested addition
for ranlib.c.

We've currently got gcc/g++ running on our HP9000s300s, Sun-3s and Sun-4s. 
All of these versions have successfully compiled InterViews, and gdb 
works well with them.  Thanks GNU!

PS:  has anyone successfully built an X server with gcc 1.35? 

mark costlow
.texsun!xochitl!cheeks