From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7tRD-0002Yn-J6 for qemu-devel@nongnu.org; Wed, 14 Mar 2012 15:01:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7tRB-0002HU-Cs for qemu-devel@nongnu.org; Wed, 14 Mar 2012 15:00:43 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:48517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7tRB-0002HA-3M for qemu-devel@nongnu.org; Wed, 14 Mar 2012 15:00:41 -0400 Message-ID: <4F60EAD6.4090407@weilnetz.de> Date: Wed, 14 Mar 2012 20:00:38 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1331742990-14385-1-git-send-email-stuart.yoder@freescale.com> <201203141654.35425.paul@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] configure: change endian cross compilation test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Stuart Yoder Am 14.03.2012 19:09, schrieb Peter Maydell: > [added qemu-devel back again] > > On 14 March 2012 17:51, Stuart Yoder wrote: >> On Wed, Mar 14, 2012 at 12:17 PM, Peter Maydell >> wrote: >>> Agreed. I think looking at the host CPUs we support the only ones >>> that aren't guaranteed either big or little endian are (a) mips >>> and (b) ARM. ARM already identifies big-endian by a compile-time >>> check, and it seems likely that MIPS could too. >> So, you're proposing just leaving the test as: >> >> # if cross compiling, cannot launch a program, so make a static guess >> case "$cpu" in >> arm) >> # ARM can be either way; ask the compiler which one we are >> if check_define __ARMEB__; then >> bigendian=yes >> fi >> ;; >> hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64) >> bigendian=yes >> ;; >> esac > No, I'm proposing that you find out what the right check_define > for mips is and make mips|mips64 have a similar case to the arm > one. Google suggests the answer is __MIPSEB__; you can do a quick > check by firing up the mipsel/mips images from > http://people.debian.org/~aurel32/qemu/ under qemu :-) > > -- PMM Running git grep "__MIPSEB__" or git grep "__MIPSEL__" would be a quicker check :-)) Stefan W.