From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22480 invoked by alias); 13 Jun 2013 14:26:19 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 22435 invoked by uid 89); 13 Jun 2013 14:26:13 -0000 X-Spam-SWARE-Status: No, score=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 13 Jun 2013 14:26:13 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5DEQAtb013712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jun 2013 10:26:10 -0400 Received: from [10.3.113.108] (ovpn-113-108.phx2.redhat.com [10.3.113.108]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5DEQ94A000472; Thu, 13 Jun 2013 10:26:09 -0400 Message-ID: <51B9D680.2030200@redhat.com> Date: Thu, 13 Jun 2013 14:26:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Chris Metcalf CC: libc-ports@sourceware.org, David Miller , vapier@gentoo.org Subject: Re: [PATCH] tile: default to little-endian in bits/endian.h References: <201306122057.r5CKvRl0008808@farm-0002.internal.tilera.com> In-Reply-To: <201306122057.r5CKvRl0008808@farm-0002.internal.tilera.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00015.txt.bz2 On 06/12/2013 04:48 PM, Chris Metcalf wrote: > 2013-06-12 Chris Metcalf > > * 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.