From fc3dad6f3a088e2abd1b8d9195e60f6acab87fe6 Mon Sep 17 00:00:00 2001 From: hjl 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186429 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386-c.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e04d1be..bf62906 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 8adb3b4..49fd4d9 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.7.4