1833599 Members
4053 Online
110061 Solutions
New Discussion

Re: C Compiler

 
Sean OB_1
Honored Contributor

C Compiler

How can I tell if the C compiler on a server can compile for 64 bits?

#what /usr/bin/cc
/usr/bin/cc:
$Revision: 92453-07 linker linker crt0.o B.11.16.01 030316 $
HP92453-01 B.11.11.08 HP C (Bundled) Compiler
$ PATCH/11.00:PHCO_27774 Oct 3 2002 09:45:59 $
4 REPLIES 4
Robert-Jan Goossens
Honored Contributor

Re: C Compiler

Sean,

If you look at the files inside the patch, you can see that they are made for 32 and 64 bits versions.

OS-Core.C-MIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP
OS-Core.C-MIN-64ALIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP
OS-Core.CORE-64SLIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP
OS-Core.CORE-SHLIBS,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP
ProgSupport.PROG-AUX,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP
ProgSupport.PROG-AX-64ALIB,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP
ProgSupport.PROG-MIN,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP

http://www5.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHCO_27774

Hope this helps,
Robert-Jan
H.Merijn Brand (procura
Honored Contributor

Re: C Compiler

The bundled C compiler, which is what you report, isn't good for anything at all.

It *can* however build 64bit. Not that it's usefule, but that's what you ark:

a5:/tmp 104 > echo 'int main (int argc, char *argv[]) { return (0); }' >test.c
a5:/tmp 105 > cc_bundled +DD64 -o test test.c
(Bundled) cc: "test.c", line 1: error 1705: Function prototypes are an ANSI feature.
Exit 1
a5:/tmp 106 > echo 'int main () { return (0); }' > test.c
a5:/tmp 107 > cc_bundled +DD64 -o test test.c
a5:/tmp 108 > file test
test: ELF-64 executable object file - PA-RISC 2.0 (LP64)
a5:/tmp 109 >

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
rick jones
Honored Contributor

Re: C Compiler

As previously implied, the bundled compiler is not really meant for compiling applications. It is there for the sole purpose of regenning kernels.

If you intend to do anything other than really trivial stuff you should obtain the "unbundled" compilers. http://software.hp.com/ might be a starting point for that.

Any of the "unbundled" HP compilers shipped since HP-UX 11.0 (circa 1997) have been able to compile applications for "LP64" - ie where longs and pointers are 64-bit. The bundled's may have been able to as well, but I've never tried it with them.

Probably already stated, but the option for "LP64" mode is +DD64 . Older compilers (11.0) would take +DA2.0W, but that has been deprecated in favor of +DD64 which covers both PA-RISC and Itanium compilation environments.
there is no rest for the wicked yet the virtuous have no pillows
Arunvijai_4
Honored Contributor

Re: C Compiler

Hi Sean,

Bundled C compiler meant for rebuilding kernel. So, it has 64 bit capabilities. But, it is not Ansi compliant. You have two choices

1) Download GCC from HP's DSPP
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html

2) Download evaluation version of HP C compiler,
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9007AAEVAL

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"