Subject: re: .cprestore?
To: maximum entropy <entropy@zippy.bernstein.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 06/18/1997 21:13:31
>I'm currently doing a make build, which seems to be running much
>better than my try the day before yesterday.  It's been running for
>about 7 or 8 hours now.

*that* is normal. it takes a good 24 hours even on a 5000/240.


>I have a question that's been nagging at me for a while...during the
>build I get lots of messages like:

>cc -O  -D_CURSES_PRIVATE -I/usr/src/lib/libcurses -fPIC -DPIC -DABICALLS -Werror
>  -c -pg idlok.c -o idlok.po
>/var/tmp/cc009965.s: Assembler messages:
>/var/tmp/cc009965.s:41: Warning: No .cprestore pseudo-op used in PIC code

>Do these warnings indicate something wrong in the source tree,
>something wrong with my compilation environment, or is it just random
>spam that should be ignored?

To the best of my (very weak) knowledge, gas knows tha the code it's
assembling should be PIC.  GCC 2.7.2.2 doesn't emit the SVR4 MIPS ABi
.cprestore pseudo-op for leaf functions.  Gas sees a function in PIC
code with no .cprestore, and issues a warning.

I've seen this with both  binutils 2.7 and binutils 2.8.

I'm not sure what to do about this.  GAS could be enhanced to not warn
for functions declared as leafs.  I'm not sure how to do that
reliably.  The closest i can see is to assume that al entrypoints
with ".frame sp, 0, ra" are leafs.

Of course, it could also be a bug in NetBSD's gcc config.

The best advice I can give is to send a bug report to the GNU
binutils maintainer.