diff mbox

PATCH: Define TRY_EMPTY_VM_SPACE for Linux/x32

Message ID 20120404010445.GA25427@intel.com
State New
Headers show

Commit Message

H.J. Lu April 4, 2012, 1:04 a.m. UTC
Hi,

This patch defines TRY_EMPTY_VM_SPACE for Linux/x32.  Tested on Linux/x32.
OK for trunk?

Thanks.


H.J.
---
2012-04-03  H.J. Lu  <hongjiu.lu@intel.com>

	* config/host-linux.c (TRY_EMPTY_VM_SPACE): Defined to
	0x60000000 for x32.
diff mbox

Patch

diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c
index 94b7a0b..b89df46 100644
--- a/gcc/config/host-linux.c
+++ b/gcc/config/host-linux.c
@@ -68,8 +68,14 @@ 
 # define TRY_EMPTY_VM_SPACE	0x10000000000
 #elif defined(__ia64)
 # define TRY_EMPTY_VM_SPACE	0x2000000100000000
-#elif defined(__x86_64)
+/* __LP64__ is defined for LP64 after GCC 3.3.  If __LP64__ isn't
+   defined for GCC 4.0 or newer, it must be x32.  */
+#elif defined(__x86_64) && (defined(__LP64__) \
+			    || !defined(__GNUC__) \
+			    || __GNUC__ < 4)
 # 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__)