]> git.proxmox.com Git - qemu.git/commitdiff
provide portable HOST_LONG_BITS test
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Dec 2010 10:43:54 +0000 (11:43 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Fri, 14 Jan 2011 16:11:58 +0000 (16:11 +0000)
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>
configure

index a9ffa224cb03f821666ca7b2adc91d1b3b5de3c5..758751ea3696311268a8d1b57ef9923764895577 100755 (executable)
--- 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
 
 
 ##########################################