1820636 Members
1919 Online
109626 Solutions
New Discussion юеВ

gcc - disable warning

 
SOLVED
Go to solution
Alex Lavrov.
Honored Contributor

gcc - disable warning

Hello, after compilation I get this warning:

/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (/var/tmp//ccRkWsca.o) was detected. The linked output may not run on a PA 1.x system.

Well, it's ok by me that it won't run on 32bit, is there any way to make gcc not print this warning?

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
8 REPLIES 8
Sameer_Nirmal
Honored Contributor

Re: gcc - disable warning

Hi

This warning is given by the ld. I am not sure about gcc and I know with ansi C
you can suppress this warning using

# cc -Wl,+vnocompatwarnings code.c

I would suggest to look the man page of ld. May you can set and export a env variable like LDOPTS so that you don't need to give those option at gcc. Look for such variable support in gcc man page.








Arunvijai_4
Honored Contributor

Re: gcc - disable warning

Hi Alex,

It comes from LD, manual says


+v[no]compatwarnings This option is accepted but ignored by the 64-bit ld. Enable [disable] printing warnings about
compatibility issues between systems. This
includes any functionality which may change in future releases. The default is +vcompatwarnings. See the WARNINGS section below for further details.

The linker emits warnings where ever it detects any compatibility
issues. Among other things, these issues include architectural ones,
as well as functionality that may change over time. Some of these
include:

+ Linking a PA 2.0 object file, which will not run on a PA 1.x
system.

+ Incremental loading with the -A option.

+ Procedure call parameter and return type checking, including
the -C option.

+ Symbols with the same name but different types, such as CODE
and DATA.

+ Checking of unsatisfied symbols by the linker, which sometimes
skips certain object files from an archived library. This
warning is only given if the -v option is also provided.

+ Versioning of objects within a shared library.

These messages can be turned off with the +vnocompatwarnings option.

-Arun

"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: gcc - disable warning

Check this:

http://devrsrc1.external.hp.com/STK/libscan.html

You have to compile to suite to PA1.x system as,

CC -c +DA1.0w test.c

hth.
Easy to suggest when don't know about the problem!
Alex Lavrov.
Honored Contributor

Re: gcc - disable warning

Yep, thanx, I know what that means, but it's "gcc", so "cc" flags do not work for it.

Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Adisuria Wangsadinata_1
Honored Contributor

Re: gcc - disable warning

Hi Alex,

Check this thread below :

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=964067

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Muthukumar_5
Honored Contributor

Re: gcc - disable warning

You have notified that compiler is gcc. You have to use gcc options of,

These `-m' options are defined for the HPPA family of computers:

-mpa-risc-1-0
Generate code for a PA 1.0 processor.

-mpa-risc-1-1
Generate code for a PA 1.1 processor.

hth.
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor
Solution

Re: gcc - disable warning

Alex, to turn off the warning from "ld" you have to use +vnocompatwarnings. You can specify with LDFLAGS as,

# export LDFLAGS="+vnocompatwarnings"

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Alex Lavrov.
Honored Contributor

Re: gcc - disable warning

Oh, that's right ...

Had a brainlock or something, it's linker flags, not compiler's ...


Thanx!


Alex.
I don't give a damn for a man that can only spell a word one way. (M. Twain)