summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini2010-12-23 11:43:54 +0100
committerBlue Swirl2011-01-14 17:11:58 +0100
commit70be1a2e1ac5ce37e809d220bb4db449633e07b1 (patch)
treec81d27980811d7a4b6bd1c5b544d666390313d3f /configure
parentdo not pass bogus $(SRC_PATH) include paths to cc during configure (diff)
downloadqemu-70be1a2e1ac5ce37e809d220bb4db449633e07b1.tar.gz
qemu-70be1a2e1ac5ce37e809d220bb4db449633e07b1.tar.xz
qemu-70be1a2e1ac5ce37e809d220bb4db449633e07b1.zip
provide portable HOST_LONG_BITS test
Do not hardcode the list of 64-bit CPUs. Use sizeof(void *) to compute it. Renaming it to HOST_LONG_BITS to HOST_POINTER_BITS is left for later. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure b/configure
index a9ffa224cb..758751ea36 100755
--- a/configure
+++ b/configure
@@ -1084,13 +1084,15 @@ esac
fi
-# host long bits test
-hostlongbits="32"
-case "$cpu" in
- x86_64|alpha|ia64|sparc64|ppc64|s390x)
- hostlongbits=64
- ;;
-esac
+# host long bits test, actually a pointer size test
+cat > $TMPC << EOF
+int sizeof_pointer_is_8[sizeof(void *) == 8 ? 1 : -1];
+EOF
+if compile_object; then
+hostlongbits=64
+else
+hostlongbits=32
+fi
##########################################