aboutsummaryrefslogtreecommitdiffstats
path: root/android-configure.sh
diff options
context:
space:
mode:
authorMarcus Comstedt <marcus@mc.pp.se>2010-10-05 21:54:12 +0200
committerMarcus Comstedt <marcus@mc.pp.se>2010-10-05 21:57:36 +0200
commit17d313248175f0905f46b5761dbed249e5e984f5 (patch)
tree4d0acc9bbec1cb6d510db7428b210d696d32ebc3 /android-configure.sh
parent4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 (diff)
downloadexternal_qemu-17d313248175f0905f46b5761dbed249e5e984f5.zip
external_qemu-17d313248175f0905f46b5761dbed249e5e984f5.tar.gz
external_qemu-17d313248175f0905f46b5761dbed249e5e984f5.tar.bz2
Fix detection of host endianness
The host endianness in android-configure.sh was backwards (assuming that HOST_BIGENDIAN=1 means that the host is bigendian). However, the script also failed to use the result, which is probably why nobody noticed. Now, HOST_WORDS_BIGENDIAN is defined in config-host.h if HOST_BIGENDIAN is 1. Change-Id: Ied07f9db76c24e5ce403ae17fde5df7f50fafe8a
Diffstat (limited to 'android-configure.sh')
-rwxr-xr-xandroid-configure.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/android-configure.sh b/android-configure.sh
index b992064..febf59c 100755
--- a/android-configure.sh
+++ b/android-configure.sh
@@ -336,7 +336,7 @@ cat > $TMPC << EOF
#include <inttypes.h>
int main(int argc, char ** argv){
volatile uint32_t i=0x01234567;
- return (*((uint8_t*)(&i))) == 0x67;
+ return (*((uint8_t*)(&i))) == 0x01;
}
EOF
feature_run_exec HOST_BIGENDIAN
@@ -441,6 +441,9 @@ case "$CPU" in
;;
esac
echo "#define HOST_$CONFIG_CPU 1" >> $config_h
+if [ "$HOST_BIGENDIAN" = "1" ] ; then
+ echo "#define HOST_WORDS_BIGENDIAN 1" >> $config_h
+fi
BSD=0
case "$TARGET_OS" in
linux-*) CONFIG_OS=LINUX