cancel
Showing results for 
Search instead for 
Did you mean: 

gcc/cc compile error

savus
Advisor

gcc/cc compile error

Hello,

I have a HP-UX 11.11. I installed from Porting And Archive Centre for HP-UX a gcc compiler. When I try to compile with it I get the below error message. Same if use the cc that came installed.

bash-2.04# cc test.c
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (test.o) was detected
. The linked output may not run on a PA 1.x system.
bash-2.04# gcc test.c
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (/var/tmp//ccX0Ejgg.o
) was detected. The linked output may not run on a PA 1.x system.

Can anybody help me with this issue ?
Thanks in advance,
Stefan
4 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: gcc/cc compile error

Hi Stefan:

This isn't an error, it's a warning (as noted).

This isn't from the compiler, its from the linker.

There is nothing to be concerned about unless you have a very ancient piece of hardware!

Regards!

...JRF...
savus
Advisor

Re: gcc/cc compile error

Hi,

thanks for the answer.
I cannot build a simple .c source code that contains a printf because of the error.
The model command returns: 9000/785/B2600.

Do you have any ideea how could I fix this ?

Regards,
Stefan
James R. Ferguson
Acclaimed Contributor

Re: gcc/cc compile error

Hi (again):

If you want to build PA-RISC 1.1 code, then you can compile with +DA1.1 as for example:

# cc +DA1.1 -o foo foo.c

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: gcc/cc compile error

As JRF said, ignore it. Your 785 is a PA2.0 machine.

>I cannot build a simple .c source code that contains a printf because of the error.

You need to show the error.

>JRF: If you want to build PA-RISC 1.1 code, then you can compile with +DA1.1

If you are using a foreign devil compiler you'll need to use something like: -march=1.1