All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>, Stuart Yoder <b08248@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] configure: change endian cross compilation test
Date: Wed, 14 Mar 2012 20:00:38 +0100	[thread overview]
Message-ID: <4F60EAD6.4090407@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA8E5jM=jk0OcM5hanMVax3VNJUg4QO3k+PGbxq_F1goUA@mail.gmail.com>

Am 14.03.2012 19:09, schrieb Peter Maydell:
> [added qemu-devel back again]
>
> On 14 March 2012 17:51, Stuart Yoder<b08248@gmail.com>  wrote:
>> On Wed, Mar 14, 2012 at 12:17 PM, Peter Maydell
>> <peter.maydell@linaro.org>  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	other threads:[~2012-03-14 19:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 16:36 [Qemu-devel] [PATCH] configure: change endian cross compilation test Stuart Yoder
2012-03-14 16:54 ` Paul Brook
2012-03-14 17:17   ` Peter Maydell
     [not found]     ` <CALRxmdAhwT-2p2VaO2mpN7sLr46BTBZRBkXsWWpoCd=UBH5PNQ@mail.gmail.com>
2012-03-14 18:09       ` Peter Maydell
2012-03-14 19:00         ` Stefan Weil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F60EAD6.4090407@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=b08248@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.