]> git.proxmox.com Git - qemu.git/commitdiff
added HOST_LONG_BITS in configure
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Jun 2005 17:10:39 +0000 (17:10 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Jun 2005 17:10:39 +0000 (17:10 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1457 c046a42c-6fe2-441c-8c8c-71466251a162

configure
cpu-defs.h

index ed4c4f745b0dee5dde5906f512651f1304ec5e49..9e4bfe03d83064f8a0bb930c2bb1f02b030727d3 100755 (executable)
--- a/configure
+++ b/configure
@@ -246,6 +246,12 @@ fi
 
 fi
 
+# host long bits test
+hostlongbits="32"
+if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then
+    hostlongbits="64"
+fi
+
 # check gcc options support
 cat > $TMPC <<EOF
 int main(void) {
@@ -520,6 +526,7 @@ if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> $config_mak
   echo "#define WORDS_BIGENDIAN 1" >> $config_h
 fi
+echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h
 if test "$mingw32" = "yes" ; then
   echo "CONFIG_WIN32=yes" >> $config_mak
   echo "#define CONFIG_WIN32 1" >> $config_h
index 042b1e88e8210417bc5967489a8a8f793736c13d..c58d271391025f4d594bc4e01a90f17544458fe1 100644 (file)
 #error TARGET_LONG_BITS must be defined before including this header
 #endif
 
-#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)
-#define HOST_LONG_BITS 64
-#else
-#define HOST_LONG_BITS 32
-#endif
-
 #ifndef TARGET_PHYS_ADDR_BITS 
 #if TARGET_LONG_BITS >= HOST_LONG_BITS
 #define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS