* [PATCH] tile: default to little-endian in bits/endian.h
@ 2013-06-12 20:57 Chris Metcalf
2013-06-13 2:53 ` Mike Frysinger
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Chris Metcalf @ 2013-06-12 20:57 UTC (permalink / raw)
To: libc-ports, David Miller, Carlos O'Donell; +Cc: vapier
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
--
1.7.10.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tile: default to little-endian in bits/endian.h
2013-06-12 20:57 [PATCH] tile: default to little-endian in bits/endian.h Chris Metcalf
@ 2013-06-13 2:53 ` Mike Frysinger
2013-06-13 14:26 ` Carlos O'Donell
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2013-06-13 2:53 UTC (permalink / raw)
To: Chris Metcalf; +Cc: libc-ports, David Miller, Carlos O'Donell
[-- Attachment #1: Type: Text/Plain, Size: 300 bytes --]
On Wednesday 12 June 2013 16:48:33 Chris Metcalf wrote:
> 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.
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tile: default to little-endian in bits/endian.h
2013-06-12 20:57 [PATCH] tile: default to little-endian in bits/endian.h Chris Metcalf
2013-06-13 2:53 ` Mike Frysinger
@ 2013-06-13 14:26 ` Carlos O'Donell
2013-06-15 17:21 ` Joseph S. Myers
2013-06-19 16:36 ` Chris Metcalf
3 siblings, 0 replies; 7+ messages in thread
From: Carlos O'Donell @ 2013-06-13 14:26 UTC (permalink / raw)
To: Chris Metcalf; +Cc: libc-ports, David Miller, vapier
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tile: default to little-endian in bits/endian.h
2013-06-12 20:57 [PATCH] tile: default to little-endian in bits/endian.h Chris Metcalf
2013-06-13 2:53 ` Mike Frysinger
2013-06-13 14:26 ` Carlos O'Donell
@ 2013-06-15 17:21 ` Joseph S. Myers
2013-06-15 18:55 ` Chris Metcalf
2013-06-19 16:36 ` Chris Metcalf
3 siblings, 1 reply; 7+ messages in thread
From: Joseph S. Myers @ 2013-06-15 17:21 UTC (permalink / raw)
To: Chris Metcalf; +Cc: libc-ports, David Miller, Carlos O'Donell, vapier
Is there a reason this went on 2.15 and 2.16 branches but not 2.17? We
don't have a specific policy about keeping the fixes on each branch a
superset of those on the previous one, but I'd think doing so is generally
a good idea....
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tile: default to little-endian in bits/endian.h
2013-06-15 17:21 ` Joseph S. Myers
@ 2013-06-15 18:55 ` Chris Metcalf
0 siblings, 0 replies; 7+ messages in thread
From: Chris Metcalf @ 2013-06-15 18:55 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: libc-ports, David Miller, Carlos O'Donell, vapier
On 6/15/2013 1:21 PM, Joseph S. Myers wrote:
> Is there a reason this went on 2.15 and 2.16 branches but not 2.17? We
> don't have a specific policy about keeping the fixes on each branch a
> superset of those on the previous one, but I'd think doing so is generally
> a good idea....
I'm waiting for David's ack as 2.17 maintainer. I got Carlos's for 2.15 (and thus I figured, implicitly 2.16). It seems pretty uncontroversial, but perhaps I should have held off until I had all the maintainers' acks?
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] tile: default to little-endian in bits/endian.h
2013-06-12 20:57 [PATCH] tile: default to little-endian in bits/endian.h Chris Metcalf
` (2 preceding siblings ...)
2013-06-15 17:21 ` Joseph S. Myers
@ 2013-06-19 16:36 ` Chris Metcalf
2013-06-19 19:21 ` David Miller
3 siblings, 1 reply; 7+ messages in thread
From: Chris Metcalf @ 2013-06-19 16:36 UTC (permalink / raw)
To: David Miller; +Cc: libc-ports, Carlos O'Donell, vapier
Ping to David Miller for the 2.17 backport; the change is on master, 2.15, and 2.16 at this point.
On 6/12/2013 4: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
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-06-19 19:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-12 20:57 [PATCH] tile: default to little-endian in bits/endian.h Chris Metcalf
2013-06-13 2:53 ` Mike Frysinger
2013-06-13 14:26 ` Carlos O'Donell
2013-06-15 17:21 ` Joseph S. Myers
2013-06-15 18:55 ` Chris Metcalf
2013-06-19 16:36 ` Chris Metcalf
2013-06-19 19:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).