[added qemu-devel back again] On 14 March 2012 17:51, Stuart Yoder <b08...@gmail.com> wrote: > On Wed, Mar 14, 2012 at 12:17 PM, Peter Maydell > <peter.mayd...@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