summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386-c.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e04d1be979c..bf62906e30c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386-c.c (ix86_target_macros): Define _ILP32
+ and __ILP32__ for x32.
+
2012-04-13 Martin Jambor <mjambor@suse.cz>
PR middle-end/52939
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index 8adb3b46dfa..49fd4d92ca8 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -383,6 +383,11 @@ ix86_target_macros (void)
cpp_define (parse_in, "__amd64__");
cpp_define (parse_in, "__x86_64");
cpp_define (parse_in, "__x86_64__");
+ if (TARGET_X32)
+ {
+ cpp_define (parse_in, "_ILP32");
+ cpp_define (parse_in, "__ILP32__");
+ }
}
else
{