[PATCH 3/5] microblaze can be either big or little endian

Mike Frysinger vapier at gentoo.org
Mon Oct 3 14:30:37 UTC 2011


On Sunday, October 02, 2011 19:47:43 Steve Bennett wrote:
> On 02/10/2011, at 4:57 AM, Mike Frysinger wrote:
> > On Thursday, September 29, 2011 18:40:21 Steve Bennett wrote:
> >> -#define __BYTE_ORDER __BIG_ENDIAN
> >> +#ifdef _BIG_ENDIAN
> >> +# define __BYTE_ORDER __BIG_ENDIAN
> >> +#else
> >> +# ifdef _LITTLE_ENDIAN
> >> +#  define __BYTE_ORDER __LITTLE_ENDIAN
> >> +# endif
> >> +#endif
> > 
> > are you sure this is correct ?  who defines "_BIG_ENDIAN" ?
> 
> It's defined by the toolchain.

that's fairly unusual for the toolchain.  but i guess it's too late now to fix 
gcc to use better names.  please add a comment that _{BIG,LITTLE}_ENDIAN come 
from the toolchain.

> c.f. libc/sysdeps/linux/mips/bits/endian.h

they aren't using _{BIG,LITTLE}_ENDIAN.  they're using sane name-spaced 
defines which are a bit more obvious in that they're coming from gcc.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20111003/e35f10ac/attachment.asc>


More information about the uClibc mailing list