This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [Patch] Fix MIPS build failure caused by -Werror=undef


On Tue, 17 Feb 2015, Joseph Myers wrote:

> > You are right.  Apparently, this header is not actually used in the
> > glibc build since it didn't cause a build failure but we should fix it
> 
> There are both sysdeps/mips/bits/endian.h (not used by any current 
> configuration) and sysdeps/unix/sysv/linux/mips/bits/endian.h - clearly 
> not both needed since one bits/endian.h file could be generic.  They 
> should be unified.  (I'd say prefer sysdeps/mips/bits/endian.h as 
> symmetric between the endiannesses, but with the comment corrected as 
> "This file is for a machine using big-endian mode." is simply wrong.)

 There's clearly nothing Linux specific there although one might ask which 
of the two of __MIPSEB vs __MIPSEB__ is the "traditional" macro we might 
want to keep.  Or maybe _MIPSEB even.  I'm not sure offhand and clearly 
current GCC defines all at a time.

 Also I wonder if sanity checks like:

#if defined (__MIPSEB) && defined (__MIPSEL)
# error "Both __MIPSEB and __MIPSEL, endianness configuration problem?"
#elif defined (__MIPSEB)
# define __BYTE_ORDER __BIG_ENDIAN
#elif defined (__MIPSEL)
# define __BYTE_ORDER __LITTLE_ENDIAN
#elif
# error "Neither __MIPSEB nor __MIPSEL, endianness configuration problem?"
#endif

would make sense here too, to catch issues early on in case someone does 
something silly with `-D' or `-U'.

  Maciej


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