Is there a way to compile C/C++ for HP PA-RISC on a non PA-RISC machine?

752 Views Asked by At

I have some code written predominantly in C which compiles on HP-UX PA-RISC, HP-UX Itanium, and Solaris SPARC platforms.

My PA-RISC machine is so far EOL its untrue, and I have a client that I need to support on that architecture.

Is it possible to compile C code on a machine other than a HP-UX PA-RISC box, and have it execute fine when the binaries are moved on a PA-RISC machine?

1

There are 1 best solutions below

4
tofro On

When HP introduced Itanium, I seem to recall that there was a (HP) cross-compiler that could produce Itanium code on a PA-RISC machine. I am, however, not aware of something that works the other way round.

I also remember HP used to run a number of public servers you could use for free to compile for Itanium (not sure for PA-RISC, though, and not sure if they still do)

gcc is conceptually able to run on one platform and cross-compile to some other, it is, however, not exactly trivial to build it for PA RISC, due to a number of peculiarities of HPUX. There are quite a number of references on the net of people who have started to do this, but I have found none so far who actually succeeded.