Hi, This patch simplifies TRY_EMPTY_VM_SPACE for Linux hosts by checking pointer size when appropriate. Tested on Linux/x86-64, Linux/ia32 and Linux/x32. OK for trunk?
Thanks. H.J. --- 2012-04-11 H.J. Lu <hongjiu...@intel.com> * config/host-linux.c (TRY_EMPTY_VM_SPACE): Check pointer size for alpha, arm, i386 and x86-64. diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c index b535758..93c513e 100644 --- a/gcc/config/host-linux.c +++ b/gcc/config/host-linux.c @@ -64,16 +64,12 @@ /* For various ports, try to guess a fixed spot in the vm space that's probably free. */ -#if defined(__alpha) -# define TRY_EMPTY_VM_SPACE 0x10000000000 +#if defined(__alpha) || defined(__ARM_EABI__) || defined(__i386) \ + || defined(__x86_64) +# define TRY_EMPTY_VM_SPACE \ + (sizeof (void *) == 8 ? 0x1000000000 : 0x60000000) #elif defined(__ia64) # define TRY_EMPTY_VM_SPACE 0x2000000100000000 -#elif defined(__x86_64) && defined(__LP64__) -# define TRY_EMPTY_VM_SPACE 0x1000000000 -#elif defined(__x86_64) -# define TRY_EMPTY_VM_SPACE 0x60000000 -#elif defined(__i386) -# define TRY_EMPTY_VM_SPACE 0x60000000 #elif defined(__powerpc__) # define TRY_EMPTY_VM_SPACE 0x60000000 #elif defined(__s390x__) @@ -86,8 +82,6 @@ # define TRY_EMPTY_VM_SPACE 0x60000000 #elif defined(__mc68000__) # define TRY_EMPTY_VM_SPACE 0x40000000 -#elif defined(__ARM_EABI__) -# define TRY_EMPTY_VM_SPACE 0x60000000 #elif defined(__mips__) && defined(__LP64__) # define TRY_EMPTY_VM_SPACE 0x8000000000 #elif defined(__mips__)