qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: change endian cross compilation test


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] configure: change endian cross compilation test
Date: Wed, 14 Mar 2012 20:00:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19

Am 14.03.2012 19:09, schrieb Peter Maydell:
[added qemu-devel back again]

On 14 March 2012 17:51, Stuart Yoder<address@hidden>  wrote:
On Wed, Mar 14, 2012 at 12:17 PM, Peter Maydell
<address@hidden>  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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]