How does one compile 64-bit executables on HP-UX PA-RISC?

Dennis Clarke dclarke@blastwave.org
Fri Jul 30 21:09:00 GMT 2010


>> If I use gcc -m64, I get an error.
>>
>> drkirkby@hpbox:~$ gcc -m64 test.c
>> cc1: error: unrecognized command line option "-m64"
>>
>> Can anyone tell me how to build 64-bit binaries with gcc on this
>> machine?
>>
>> Dave
>
> GCC on HP-UX PA-RISC uses seperate compilers for 32 and 64 bit modes
> because 32 bit mode is SOM based and 64 bit mode is ELF based.  You can
> get pre-built GCC compilers from http://www.hp.com/go/gcc and if you do
> then you would need to download and install 2 different compilers to
> generate both 32 and 64 bit code.  The 32 bit compiler from this
> location installs as /opt/hp-gcc/bin/gcc and the 64 bit compiler
> installs as /opt/hp-gcc64/bin/gcc.  If you are building GCC yourself you
> need to build GCC with a target like 'hppa64-hp-hpux11.23' to build a
> compiler that can generate 64 bit objects (but it will not  be able to
> generate 32 bit objects).  If you build with a target such as
> 'hppa2.0w-hp-hpux11.23' then you will get a compiler that can generate
> 32 bit objects but not 64 bit objects.
>
> Steve Ellcey
> sje@cup.hp.com

            GCC is real open and *free* software.

It is far better to get the sources and built it yourself rather than
trust some massive huge corporation.  For a number of reasons.

Please see :

http://mail.opensolaris.org/pipermail/opensolaris-discuss/2010-July/058277.html


-- 
Dennis Clarke
dclarke@opensolaris.ca  <- Email related to the open source Solaris
dclarke@blastwave.org   <- Email related to open source for Solaris




More information about the Gcc-help mailing list