This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS glibc-2.3.2 build failure with gcc-3.4


Richard Sandiford wrote:
Michael Eager <eager@mvista.com> writes:

I'm building glibc-2.3.2 for mips with the gcc-3.4-20040114 snapshot.

I'm getting an error building sigaction.c:
  ../sysdeps/unix/sysv/linux/mips/sigaction.c:83: error: $1 cannot be used in asm here

This code compiles using gcc-3.3.1.


This is a side-effect of a "cute" trick in the MIPS port.
Since it doesn't use $1 for anything, it reuses register 1 for
FRAME_POINTER_REGNUM.

I guess this was a good idea at one time (it reduced the number of hard
registers so could have reduced memory requirements or compile time).
But these days we have several hard registers that aren't being used for
anything.  We might as well use one of them as the frame pointer.

I've just tried the quick hack below and it seems to make
your test case pass.  I'll try to clean it up and test it later.

Yes, your patch fixes the problem.


In the meantime, can you file a bug report for this so that
we don't lose track of it?  Thanks.

Will do.




--
Michael Eager	 Eager Consulting     eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]