Operating System - HP-UX
1820879 Members
5220 Online
109628 Solutions
New Discussion юеВ

building 32 bit using gcc on 64 bit 11i

 
Gopinath_3
Advisor

building 32 bit using gcc on 64 bit 11i

Hi,

I have installed hp-ux 11.11 64 bit on a N4000 mchine.

I have to build a 32 bit appln on this machine using gcc. I have installed the 64 bit version of gcc but does not show any flags on how to build a 32 bit appln.

Any pointers?

Thanks

Gopi
2 REPLIES 2
Sebastien Masson
Valued Contributor

Re: building 32 bit using gcc on 64 bit 11i

Go there http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html

In fact, There are separate compilers for building ILP32 and LP64 executables on HPPA. The ILP32 compiler is located in /usr/local/bin and the LP64 compiler is located in /usr/local/pa20_64/bin. The HPPA LP64 compiler will automatically generate LP64 code -- no special arguments need to be passed. For the IPF compiler, the command-line argument -mlp64 should be used to have the compiler generate LP64 code.
Gopinath_3
Advisor

Re: building 32 bit using gcc on 64 bit 11i

I looked at the flags to gcc and the only hppa specific flag that seems relevant is

-mpa-risc-1-0 (or -mpa-risc-1-1 or -mpa-risc-2-0)

When I build a simple source with one of these flags and do a file on the executable, they are all

ELF-64 executable object file PA-RISC 2.0 (LP64)

irrespective of which -mpa-risc flag I use.

Gopi