Operating System - HP-UX
1832367 Members
2909 Online
110041 Solutions
New Discussion

PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

 
Mike Nemeth
Advisor

PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

Ive a hpux 11.0 b2000 and a hpux 11.0 b2600.
Both of these are PA-RISC2.0, correct?
Yet a simple c program defaults to 1.1 on the
B2000 and 2.0 on the b2600. I cann't find where
this is being set! Does any one know where to
set it as a system wide default?
6 REPLIES 6
Kenneth Platz
Esteemed Contributor

Re: PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

Mike,

This is controlled by the +DA (destination architecture) compiler flag. Using the +DA2.0 flag will specify PA-RISC 2.0 code generation. +DA2.0W will specify 64-bit code generation.

hope this helps.
I think, therefore I am... I think!
Mike Nemeth
Advisor

Re: PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

Yes that what we did do in the real application. But a simple cc -O testhostid.c -o testhostid produces a 1.1 object on the B2000 and 2.0 object on th B2600. There must be a place where is is being defaulted. I checked
the various ."shells" files and there system
defaults but could find and thing.

Since the B2600 is the CM machine this is a problem.
A. Clay Stephenson
Acclaimed Contributor

Re: PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

Check to see if the CCOPTS environment variable is set. Next, do a "model" command on each box and match the outputs with the values in /opt/langtools/lib/sched.models.

One option would be to set and export CCOPTS in /etc/profile.

e.g.

export CCOPTS=+DA2.0
If it ain't broke, I can fix that.
Mike Nemeth
Advisor

Re: PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

I checked /opt/langtools/lib/sched.models and
model. Model tells me 9000/785/B2000 and
9000/785/B2600 . 785 in sched.models is the same on both systems.
Echo $CCOPTS returns a blank line on both.

The problems NOT how to fix it, its how can
they be different . One machine the B2600 is
a CM verifcatiom machine. It should match the enviorment of the b2000 build machine.
This is an importain CM issue. One or the
other system was changed somewhere and I can't
find where.
Gregory Fruth
Esteemed Contributor

Re: PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

Perhaps cc defaults differently for +DA
depending on kernel bit-ness. Do a
"getconf KERNEL_BITS" to see if you're
in 32-bit or 64-bit mode.
rick jones
Honored Contributor

Re: PA-RISC1.1 vs PA-RISC2 .0 object generation from ansi cc

It has always been my understanding that if compiling on a PA2.0 system, one gets a PA 2.0 object by default with the HP compilers. If one system is getting PA 1.1 objects I might be inclined to make sure that the systems have both the same versions of the compiler, and that one doesn't happen to have say GCC instead.

Also, speaking of 64-bit, the "proper" way to ask for 64-bit is to use +DD64 rather than +DA2.0W - +DD64 will also work on IPF.

As for trying to figure-out where something might be set, if all else fails, tusc'ing a compilation may be interesting.
there is no rest for the wicked yet the virtuous have no pillows