[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 07/15] provide portable HOST_LONG_BITS test
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH v3 07/15] provide portable HOST_LONG_BITS test |
Date: |
Thu, 23 Dec 2010 11:43:54 +0100 |
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 <address@hidden>
---
configure | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index d5ae996..a3ff503 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
##########################################
--
1.7.3.2
- [Qemu-devel] [PATCH v3 00/15] preparation for autoconfy configure script, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 01/15] default compilation tools to environment variables, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 02/15] default make and install to environment variables, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 03/15] move feature variables to the top, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 04/15] fix sparse support (?), Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 05/15] test cc with the complete set of chosen flags, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 06/15] do not pass bogus $(SRC_PATH) include paths to cc during configure, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 08/15] fix spelling of $pkg_config, move default together with other cross tools, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 07/15] provide portable HOST_LONG_BITS test,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v3 09/15] do not default to non-prefixed pkg-config when cross compiling, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 11/15] move "ln -sf" emulation to a function, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 10/15] reorganize sdl-config tests, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 12/15] remove source_path_used, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 15/15] make trace options use autoconfy names, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 13/15] move --srcdir detection earlier, Paolo Bonzini, 2010/12/23
- [Qemu-devel] [PATCH v3 14/15] remove HOST_CC mention from roms/{sea, vga}bios/config.mak, Paolo Bonzini, 2010/12/23