Operating System - Linux
1753846 Members
7600 Online
108807 Solutions
New Discussion юеВ

how to compile 64bit code using gcc under hpux 11iv1

 
SOLVED
Go to solution
John712_1
Regular Advisor

how to compile 64bit code using gcc under hpux 11iv1

Hi there,

am doing some c++ programming under hpux11i v1 using GNU gcc/g++ and what option should I use to generate 64bit code? thanks in advance.
3 REPLIES 3
Jeff_Traigle
Honored Contributor
Solution

Re: how to compile 64bit code using gcc under hpux 11iv1

Depending what version and where you got it, you may have no choice but to compile 64-bit. The version on the Porting & Archive site has no 32-bit libraries. It will compile 32-bit libraries if given the option to do so (I think it's -mPA-RISC1.1 for 32-bit and -mPA-RISC2.0 for 64-bit), but final executable binaries relying on the standard supplied libraries will only compile as 64-bit. Discovered this when trying to compile a newer version of openssh a couple of months ago. I had to revert to an older 32-bit version of gcc we had retained in a depot to create 32-bit version of the package. Since you want 64-bit, you should be golden without any extra effort or options.
--
Jeff Traigle
John712_1
Regular Advisor

Re: how to compile 64bit code using gcc under hpux 11iv1

Many thanks, Jeff. I once installed a gcc 4.1.0 which is downloaded from the porting and archieving center, and I also have HP gcc4.1.1 installed. I don't which version of gcc I am using, however, when I do #which gcc/g++, it gives me the HP one.
James R. Ferguson
Acclaimed Contributor

Re: how to compile 64bit code using gcc under hpux 11iv1

Hi John:

# gcc -v

...will show you the version and compiletime options.

Regards!

...JRF...