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>
This commit is contained in:
parent
f9728943ff
commit
70be1a2e1a
|
@ -1084,13 +1084,15 @@ esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# host long bits test
|
# host long bits test, actually a pointer size test
|
||||||
hostlongbits="32"
|
cat > $TMPC << EOF
|
||||||
case "$cpu" in
|
int sizeof_pointer_is_8[sizeof(void *) == 8 ? 1 : -1];
|
||||||
x86_64|alpha|ia64|sparc64|ppc64|s390x)
|
EOF
|
||||||
hostlongbits=64
|
if compile_object; then
|
||||||
;;
|
hostlongbits=64
|
||||||
esac
|
else
|
||||||
|
hostlongbits=32
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
|
|
Loading…
Reference in New Issue