OSDN Git Service

Define _ILP32 and __ILP32__ for x32
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Apr 2012 18:22:54 +0000 (18:22 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Apr 2012 18:22:54 +0000 (18:22 +0000)
Backported from mainline
* config/i386/i386-c.c (ix86_target_macros): Define _ILP32
and __ILP32__ for x32.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186430 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386-c.c

index 3bb08d7..b1acf0f 100644 (file)
@@ -1,3 +1,11 @@
+2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       Backported from mainline
+       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  Tom de Vries  <tom@codesourcery.com>
 
        Backport from mainline r186418.
index d4b0b08..62772b7 100644 (file)
@@ -381,6 +381,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
     {