From 6573c644e83d576fd16847d5c21a26c2f0500921 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 13 Apr 2012 18:20:10 +0000 Subject: [PATCH] Define _ILP32 and __ILP32__ for x32 * config/i386/i386-c.c (ix86_target_macros): Define _ILP32 and __ILP32__ for x32. From-SVN: r186429 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386-c.c | 5 +++++ 2 files changed, 10 insertions(+) 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 + + * config/i386/i386-c.c (ix86_target_macros): Define _ILP32 + and __ILP32__ for x32. + 2012-04-13 Martin Jambor 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 { -- 2.30.2