views:

248

answers:

1

I want to compile GCC and binutils which would produce 64bit executables. From GNU documents I've found out that it must look like ia64-*-hpux*.

For ia64-hp-hpux11*, the default output type is 32bit:

 % file ./a.out
 ./a.out:        ELF-32 executable object file - IA64

That is what I have:

 % uname -s -r -v -m
 HP-UX B.11.31 U ia64

So what woluld be 64bit target triplet for ia64-hpux

+2  A: 

From the GCC manual:

-milp32
-mlp64
    Generate code for a 32-bit or 64-bit environment. The 32-bit environment
sets int, long and pointer to 32 bits. The 64-bit environment sets int to 32
bits and long and pointer to 64 bits. These are HP-UX specific flags.

So you need to pass '-mlp64' to GCC. I'm not sure if there is a separate triplet that would automatically turn this on, but you can always add your own CFLAGS when compiling.

Eduard - Gabriel Munteanu