This is the mail archive of the mailing list for the newlib 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: Build fails for mips1

On Sun, 2013-02-10 at 15:28 -0600, Joel Sherrill wrote:
> I have a hack of a patch to get mips-rtems to build. I thought I had posted it but maybe I didn't.
> I think it is a bug in the new implementation.
> --joel

Yes, this is a bug.  I have been able to reproduce it.   The problem is

#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \

When building for mips-elf, _MIPS_ISA is defined (by GCC) as _MIPS_ISA_MIPS1.
The problem is that _MIPS_ISA_MIPS1 (and MIPS4, and MIPS5, etc) are not defined
to have any specific values.  So _MIPS_ISA is expanded to _MIPS_ISA_MIPS1 and
_MIPS_ISA_MIPS1 is expanded to 'nothing'.  Since the value of '_MIPS_ISA_MIPS4'
is also 'nothing', they match and we set USE_PREFETCH when we shouldn't.

The long term fix is to fix the defines that GCC does for the MIPS_ISA macros, but
in the short term I guess we could check a different define, I see GCC is also doing
these defines with mips1:

#define _MIPS_ARCH_MIPS1 1
#define _MIPS_ARCH "mips1"

We could check one of those.  I will send a patch soon.

Steve Ellcey (

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