i386: Define __ILP32__ and _ILP32 for all 32-bit targets
authorGerald Pfeifer <gerald@pfeifer.com>
Thu, 7 May 2020 22:48:52 +0000 (00:48 +0200)
committerGerald Pfeifer <gerald@pfeifer.com>
Sun, 10 May 2020 21:43:04 +0000 (23:43 +0200)
* config/i386/i386-c.c (ix86_target_macros): Define _ILP32 and
__ILP32__ for 32-bit targets.

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

index cff8ea3..b0f0413 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-10  Gerald Pfeifer  <gerald@pfeifer.com>
+
+       * config/i386/i386-c.c (ix86_target_macros): Define _ILP32 and
+       __ILP32__ for 32-bit targets.
+
 2020-05-09  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree.h (expr_align): Delete.
index b46ebb2..891b2c6 100644 (file)
@@ -701,6 +701,8 @@ ix86_target_macros (void)
       cpp_assert (parse_in, "cpu=i386");
       cpp_assert (parse_in, "machine=i386");
       builtin_define_std ("i386");
+      cpp_define (parse_in, "_ILP32");
+      cpp_define (parse_in, "__ILP32__");
     }
 
   if (!TARGET_80387)