Operating System - HP-UX
1831651 Members
2022 Online
110029 Solutions
New Discussion

best way to determine what "C compiler" is executing on system

 
SOLVED
Go to solution
Jerry L. Sims
Frequent Advisor

best way to determine what "C compiler" is executing on system

Hello All,

Just would like your respected opinions on locating "compilers" on hp-ux system. The proceedures I have followed in the past have been as follows:

which cc ( locates path of "cc" ):
/usr/bin/cc

what /usr/bin/cc ( delivers product # & version # ):
HP92453-01 A.11.01.21 HP C (Bundled) Compiler
$ Sep 8 2000 23:13:51 $

ls -la /usr/bin/cc ( delivers what "/usr/bin/cc" is linked to ):
lrwxr-xr-t 1 root sys 15 Dec 12 09:17 /usr/bin/cc -> /usr/ccs/bin/cc
( actual bundled "C" compiler )

Does this sound correct ? I attempted to execute "swlist" for ( product, bundle, fileset ) but only received the following:
swlist -l product | grep -i compiler
CPS B.11.11 Compiler Parallel Support Library
5 REPLIES 5
Michael Tully
Honored Contributor
Solution

Re: best way to determine what "C compiler" is executing on system

How to find your compiler, is how you have stated, but to find it in 'swlist' try:

# swlist -l product | grep -i ansi
Anyone for a Mutiny ?
Elena Leontieva
Esteemed Contributor

Re: best way to determine what "C compiler" is executing on system

On my machine ansi C compiler does show up under product:

coc741(root):/opt/mcafee> swlist -l product |grep -i compiler
C-ANSI-C B.11.11.08 HP C/ANSI C Compiler
CPS B.11.11 Compiler Parallel Support Library

coc741(root):/opt/mcafee> swlist |grep -i ansi
B3901BA B.11.11.08 HP C/ANSI C Developer's Bundle for HP-UX 11.i (S800)
coc741(root):/opt/mcafee>
Jeff Schussele
Honored Contributor

Re: best way to determine what "C compiler" is executing on system

Hi Jerry,

HP bundles a minimal C compiler in the OS strictly to compile the kernel - no more, no less. Anything further requires the non-free C product. Tully's method will determine whether you have it or not.

My $0.02,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jerry L. Sims
Frequent Advisor

Re: best way to determine what "C compiler" is executing on system

Thanks you all. I have the poor man's version
of "cc" compiler. I will talk to old "money bags" abount getting the "ANSI C" product.
Jeff Schussele
Honored Contributor

Re: best way to determine what "C compiler" is executing on system

Hmmm..I missed that in Tully's 1st post.
Elena's correct - The Ansi C compiler is a BUNDLE & will not be reported in an -l product command - just do
swlist | grep -i ansi

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!