1855721 Members
6753 Online
104103 Solutions
New Discussion

Re: What's /bin/cc

 
Vibhor Kumar Agarwal
Esteemed Contributor

What's /bin/cc

Hi,

I am using a HP 11.11 PA-RISC box.

Was aware of the aCC compiler which works both as C & CC compiler.

Now what's /bin/cc
Its a link to /usr/ccs/bin/cc which in turn is to /usr/ccs/bin/cc_bundled

Looks like its the C compiler, then how do i determine its version.
Vibhor Kumar Agarwal
18 REPLIES 18
Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

Thread seems not to be visible.

Replying to check
Vibhor Kumar Agarwal
Venkatesh BL
Honored Contributor

Re: What's /bin/cc

cc -V will tell the version.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

Its doing nothing.

% /bin/cc -V
%

Vibhor Kumar Agarwal
Venkatesh BL
Honored Contributor

Re: What's /bin/cc

Not sure why. May be 'cc' on 11.11 doesn't support it.

On my 11.23,
# cc -V
(Bundled) cc: HP C/aC++ B3910B A.06.12 [Oct 11 2006]

Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

So coming back to first part, what is this cc.

aCC does the work of both C & C++ right?
Vibhor Kumar Agarwal
F Verschuren
Esteemed Contributor

Re: What's /bin/cc

cc_bundled is a Bundled C Compiler whit limited functionality
the -V option alsow doesnot work for me...

I know it is old so normaly I will install a gcc product

Steven Schweda
Honored Contributor

Re: What's /bin/cc

I don't know about the version, but I can
get it to admit which compiler it is:

dy # /bin/cc -v
(Bundled) cc: NLSPATH is /usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/C/%N.cat:
(Bundled) cc: CCOPTS is not set.
(Bundled) cc: INCLUDIR is INCLUDIR=/usr/include

When you get desperate, there's always
"strings":

dy # strings /bin/cc | grep -i bundled
HP92453-01 A.11.01.21 HP C (Bundled) Compiler
(X(Bundled) cc

(That wasn't too bad.)
Robert-Jan Goossens
Honored Contributor

Re: What's /bin/cc

Hi,

The /bin/cc -> /usr/ccs/bin/cc is the internal OS bundles C compiler.The bundled C compiler /usr/ccs/bin/cc is used for kernel compilation.

Robert-Jan
Bill Hassell
Honored Contributor

Re: What's /bin/cc

And to add some details, the bundled C compiler is the K&R version, a small subset of the ANSI or aCC compiler. Most C programs will not compile on the bundled compiler as they use ANSI features. To see the what strings:

$ what /usr/ccs/bin/cc_bundled
/usr/ccs/bin/cc_bundled:
HP92453-01 A.11.01.21 HP C (Bundled) Compiler
$ Sep 8 2000 23:13:51 $

If you have the aCC compiler, you will see it installed in the /opt/aCC directory. Or you can use swlist to show the product filesets:

swlist -l fileset ACXX

If swlist shows ACXX not found, then you'll need to purchase the compiler from HP, or download GCC for free.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: What's /bin/cc

>the C compiler, then how do I determine its version.

If you are on PA, you must provide a source file to get the version with -V.
There is no need to determine the version of the bundled C compiler since it isn't updated.

>aCC does the work of both C & C++ right?

The aC++ compiler on PA has an -Ae option for C. But if you want the C compiler you should use the C compiler, cc. You now get both in the same bundle.

On IPF, there is only one compiler and one set of bits, that does both.

>Steven: When you get desperate, there's always "strings":

what(1) works a little nicer.

>Bill: the bundled C compiler is the K&R version,

This is no longer true on IPF.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

What's K&R version?

Since which version does aCC comes with cc. I am using 3.63 and it doesn't have it. For that do i need to use the -Ae option.

For Itanium platforms, does aCC by default compile both C & C++ code?
Vibhor Kumar Agarwal
Dennis Handly
Acclaimed Contributor

Re: What's /bin/cc

>What's K&R version?

K&R is the opposite of everything that is good and pure. :-) Non-Standard, not ANSI C.

>Since which version does aCC comes with cc. I am using 3.63 and it doesn't have it.

Both aC++ and PA HPC are bundled in the same product B9007AA. This was with the A.03.70 version in 2006.

>For that do i need to use the -Ae option.

If you don't have ANSI C installed and you don't have B9007AA.

>For Integrity, does aCC by default compile both C & C++ code?

No. You use cc if you want C, aCC if you want C++. If you use aCC -Ae, you're compiling C, but why make it hard on yourself with extra typing.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

That means Ansic package comes with aCC 3.70 onwards.

Then how come i have it even though i have 3.63
Vibhor Kumar Agarwal
Dennis Handly
Acclaimed Contributor

Re: What's /bin/cc

>That means Ansi C package comes with aCC 3.70 onwards.

Well, more correctly, B9007AA contains aC++ and HP HPC. One PA, each has their own versioning.

>Then how come i have it even though i have A.03.63

You could have purchased B3901BA separately or you don't have /opt/ansic but have the bundled C compiler. Your initial question indicated the latter.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

It seems to be the bundled one as all links point to ccs_bundled.

This one comes by default with the system, right. No matter whether you have aCC or not.
Vibhor Kumar Agarwal
Dennis Handly
Acclaimed Contributor

Re: What's /bin/cc

>This one comes by default with the system, right. No matter whether you have aCC or not.

Yes. This is why you might want to use aCC -Ae.
Andrew Merritt_2
Honored Contributor

Re: What's /bin/cc

>>What's K&R version?

> K&R is the opposite of everything that is good and pure. :-) Non-Standard, not ANSI C.


Slightly misleading! K & R stands for Kernighan and Ritchie, the authors of The C Programming Language (the book; Dennis Ritchie was largely responsible for the original language itself). The language as described in the first edition of this book is known as "K&R C".

The current, second, edition of the book describes the language as defined in the ANSI C standard.

Andrew
Vibhor Kumar Agarwal
Esteemed Contributor

Re: What's /bin/cc

Thanks everybody
Vibhor Kumar Agarwal