When you are going to use the GNU C compiler (gcc), and you don't have gcc yet, you can either build it yourself from the sources (available from e.g. http://www.gnu.ai.mit.edu/software/gcc/releases.html) or fetch a prebuilt binary from the HP porting center. There are two places where gcc prebuilds can be fetched; the first and best (for HP-UX 11 only) is http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,0 0.html the second is http://hpux.cs.utah.edu/hppd/hpux/Gnu/ where you can also find the GNU binutils package. (Browse through the list, because there are often multiple versions of the same package available).
Above mentioned distributions are depots. H.Merijn Brand has made prebuilt gcc binaries available on https://www.beepz.com/personal/merijn/ and/or http://www.cmve.net/~merijn/ for HP-UX 10.20 and HP-UX 11.00 in both 32- and 64-bit versions. Most likely 11i will be available soon. These are bzipped tar archives that also include recent GNU binutils and GNU gdb. Read the instructions on that page to rebuild gcc using itself.
Building a 64bit capable gcc from source is possible only when you have the HP C-ANSI C compiler available, which you should use anyway when building perl.
Jeff Okamoto <email@example.com> H.Merijn Brand <firstname.lastname@example.org>
With much assistance regarding shared libraries from Marc Sabatella.