This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] tile: default to little-endian in bits/endian.h
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Chris Metcalf <cmetcalf at tilera dot com>
- Cc: libc-ports at sourceware dot org, David Miller <davem at davemloft dot net>, vapier at gentoo dot org
- Date: Thu, 13 Jun 2013 10:26:08 -0400
- Subject: Re: [PATCH] tile: default to little-endian in bits/endian.h
- References: <201306122057 dot r5CKvRl0008808 at farm-0002 dot internal dot tilera dot com>
On 06/12/2013 04:48 PM, Chris Metcalf wrote:
> 2013-06-12 Chris Metcalf <cmetcalf@tilera.com>
>
> * sysdeps/tile/bits/endian.h (__BYTE_ORDER): Default to little.
>
> This turns out to be helpful when doing a from-scratch cross-compile of
> gcc and glibc, since you can then do "make install-headers" in glibc
> even before you have a functioning tile gcc.
>
> This was pointed out by Mike Frysinger (cc'ed).
>
> David, Carlos, I'd like to also backport this to glibc 2.17 and 2.16,
> to make cross-building easier there. It applies to 2.15 as well, but
> I'm not sure how far back it makes sense to go with this kind of thing.
>
> diff --git a/ports/sysdeps/tile/bits/endian.h b/ports/sysdeps/tile/bits/endian.h
> index 43d94bb..835042a 100644
> --- a/ports/sysdeps/tile/bits/endian.h
> +++ b/ports/sysdeps/tile/bits/endian.h
> @@ -6,8 +6,6 @@
>
> #if defined __BIG_ENDIAN__
> # define __BYTE_ORDER __BIG_ENDIAN
> -#elif defined __LITTLE_ENDIAN__
> -# define __BYTE_ORDER __LITTLE_ENDIAN
> #else
> -# error "Endianness not declared!!"
> +# define __BYTE_ORDER __LITTLE_ENDIAN
> #endif
>
This looks OK to me. It always seems correct to change
an error case into a default. Just make sure that LE
is exactly the default you want.
OK for 2.15.
Cheers,
Carlos.