From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2075 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: need possibility to override default endianness Date: Wed, 10 Oct 2012 20:11:39 -0400 Message-ID: <20121011001139.GU254@brightrain.aerifal.cx> References: <5075EF00.6090400@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1349914821 5104 80.91.229.3 (11 Oct 2012 00:20:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 00:20:21 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2076-gllmg-musl=m.gmane.org@lists.openwall.com Thu Oct 11 02:20:28 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TM6Vn-0006Ts-C4 for gllmg-musl@plane.gmane.org; Thu, 11 Oct 2012 02:20:27 +0200 Original-Received: (qmail 23781 invoked by uid 550); 11 Oct 2012 00:20:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 23773 invoked from network); 11 Oct 2012 00:20:20 -0000 Content-Disposition: inline In-Reply-To: <5075EF00.6090400@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2075 Archived-At: On Wed, Oct 10, 2012 at 11:56:16PM +0200, John Spencer wrote: > if you compile musl mips on mispel with landley's gcc 4.1.2, or gcc > 3.4.6, bits/endian.h says the BYTE_ORDER == __BIG_ENDIAN, and breaks > built apps (for example sha512 code used in butch). > > i know that more recent gcc's set the macro automatically, still: > > rather than overwriting that file manually i'd prefer if musl had a > flag to indicate the desired endianness. > > i.e. ./configure --with-target-endian=little I'd rather either have this auto-detected, or use a separate arch name for the backwards-endian variants (i.e. mipsel and armeb) but without duplicating all the asm dirs. This would require some sort of subarch or second arch search path support. Any sketch of how that should work? (either the auto-detection of endianness or subarch stuff) Maybe there's just some other macro older gccs define for mipsel and armeb that we could detect in the bits/endian.h files at compile-time...? Rich