[gnu.utils.bug] gcc 1.36 & HP-UX

mike@fionn.lbl.gov (Michael Helm) (10/16/89)

I'm trying to bring up gcc-1.36 on HP-UX 6.5 in its "GNU" form, ie
using the GNU assembler & bin utilities, hoping to get a gdb-able
version out of it (among other things).  I'm having some startup
problems with gcc, & there are some ambiguities in how to how to use
the binutils.  If anyone else has worked thru this procedure I'd
appreciate your looking thru what follows & pointing out any
miscues or dropping some hints about how my difficulties mite be
worked out.

1st, I built gas-1.34 & the hp binutils (ld &c, & hpxt), using HPUX's
cc.  gas-1.34 seems to need an a.out.h include from the
binutils/hp-include directory, & also a.out.gnu.h from binutils, in
order to get write.c to compile. I also ran a script in
binutils/hp-bin called "mkhplib" which chewed up all the HP libraries
& made copies of them in /usr/local/lib/gnu.  However I don't think
that the gcc I made later on knows about this (ls -lu), or even needs it --
could anyone enliten me?  I copied ld & a68 to /usr/local/lib/gcc-*, &
also copied an hpxt-ified version of crt0.o there.  I'm not sure what
to do with the other utilites, particularly ranlib & ar: are they
needed?  The gcc Makefile is somewhat unclear about this (see below).

Next, I config'ed gcc for hp9k320-gas, & made the additional changes
in the config-produced Makefile needed for HPUX.  Most of these
changes are just a matter of uncommenting lines in the Makefile (I
changed the paths to my hp-includes directory).  There is 1 place
[~line 225] where Makefile comments tell you to delete
mv tmpgnulib gnulib
instead of (?) a preceding ranlib step.  Other than this the 1st stage
built w/o problems.

After doing "make stage1" I tried building using the stage1 gcc.
It picked up gcc-ld & gcc-as.  However, it didn't like the "-g"
option suggested in INSTALL: it seemed to pass this to ld as "-lg"!
"-gg" "works" (this doesn't turn into a loader flag, & more symbols
seem to be in executables, based on gnu-nm)  but the gcc manual
says this option is obsolete.  I don't have this problem on 
Sun3/4's, where I've also built 1.36.  What happened?  Did I botch
something? 

I then went ahead & built using stage1 & then stage2, w/ "-gg -O".
Testing the binaries showed that most stage2 & stage2 .o's differed,
in random places.  It seems to work on simple programs.  I haven't
tried making gdb yet.  Still, it's a bad sign.  Any ideas?

Thanks,
Michael Helm  (mike@fionn.lbl.gov) (M_Helm@lbl.gov)
LBL