Commit b685369795f028535862cb3caddaf219c655db2a

Authored by bellard
1 parent 3f1a88f4

added HOST_LONG_BITS in configure


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1457 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 7 additions and 6 deletions
configure
... ... @@ -246,6 +246,12 @@ fi
246 246  
247 247 fi
248 248  
  249 +# host long bits test
  250 +hostlongbits="32"
  251 +if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then
  252 + hostlongbits="64"
  253 +fi
  254 +
249 255 # check gcc options support
250 256 cat > $TMPC <<EOF
251 257 int main(void) {
... ... @@ -520,6 +526,7 @@ if test &quot;$bigendian&quot; = &quot;yes&quot; ; then
520 526 echo "WORDS_BIGENDIAN=yes" >> $config_mak
521 527 echo "#define WORDS_BIGENDIAN 1" >> $config_h
522 528 fi
  529 +echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h
523 530 if test "$mingw32" = "yes" ; then
524 531 echo "CONFIG_WIN32=yes" >> $config_mak
525 532 echo "#define CONFIG_WIN32 1" >> $config_h
... ...
cpu-defs.h
... ... @@ -29,12 +29,6 @@
29 29 #error TARGET_LONG_BITS must be defined before including this header
30 30 #endif
31 31  
32   -#if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__)
33   -#define HOST_LONG_BITS 64
34   -#else
35   -#define HOST_LONG_BITS 32
36   -#endif
37   -
38 32 #ifndef TARGET_PHYS_ADDR_BITS
39 33 #if TARGET_LONG_BITS >= HOST_LONG_BITS
40 34 #define TARGET_PHYS_ADDR_BITS TARGET_LONG_BITS
... ...