Operating System - HP-UX
1753768 Members
5293 Online
108799 Solutions
New Discussion юеВ

cc in linux vs. cc in hp-ux

 
Trond Jacobsson
Occasional Contributor

cc in linux vs. cc in hp-ux

Are there any differences between the c-compiler cc in linux compared to the one in hp-ux? I am trying to run a makefile which try to compile some files using cc, it also try to use CC (is there any difference?) but with bad result:

"-p is unsupported in the bundled compiler, ignored."
"-Aa is unsupported in the bundled compiler, ignored."

and so on, so now I wonder if I need to install some other version of cc.
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: cc in linux vs. cc in hp-ux

I expect that linux uses the Gnu C compiler which you can also install for HP-UX. HP's bundled C compiler is not fully functional - it is really only intended for building the kernel.

http://hpux.cs.utah.edu/hppd/hpux/Gnu/gcc-4.1.1/


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: cc in linux vs. cc in hp-ux

Hi Trond:

Linux uses the GNU C ('gcc') compiler while HP offers its own proprietary version. The makefiles for use with each will differ. You need to purchase the HP C compiler whereas the GNU one is free.

There are various ports of 'gcc' for HP-UX available if you choose.

Regards!

...JRF...
Steven Schweda
Honored Contributor

Re: cc in linux vs. cc in hp-ux

And "CC" is normally a C++ compiler, which
comes as part of the GCC kit, but which, I
assume, would be a separate product from HP.
Jarle Bjorgeengen
Trusted Contributor

Re: cc in linux vs. cc in hp-ux

Also cc in hp-ux without the aCC bundle installed is a very stripped compiler that only is capable of compile (link) a new hp-ux kernel, and will not comply the full ansi C standard.

But gcc is freely available for hp-ux on

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

- Jarle B.
A. Clay Stephenson
Acclaimed Contributor

Re: cc in linux vs. cc in hp-ux

The fundamental difference is that the C compiler that is delivered with HP-UX is the "Bundled C Compiler" and it only understands K&R syntax. The Bundled C Compiler is really only intended for kernel generation but can be used for limited C development. If you need ANSI C support then you need to purchase the ANSI/C compiler or use aCC which will compile both C++ and ANSI C source code. (The ANSI/C compiler is being phased out in favor of aCC). Your other (free) choice is gcc which can be downloaded from any of the HP-UX Porting Centre's.
If it ain't broke, I can fix that.
Trond Jacobsson
Occasional Contributor

Re: cc in linux vs. cc in hp-ux

thanks for all the help, I have asked the sysadmin to install gcc on the server and hopefully he will have done so by tomorrow (I am not an admin, nor do I have direct access to the server hence I can't do it myself).
Dennis Handly
Acclaimed Contributor

Re: cc in linux vs. cc in hp-ux

>Clay:is the "Bundled C Compiler" and it only understands K&R syntax.

The opposite is true for Integrity.

>(The ANSI C compiler is being phased out in favor of aCC).

This has always been true for Integrity, from 11.22 on.

Currently if you purchase a compiler on PA or IPF, you get both.