[Darwin, PPC] Fix fail of cpp/assert4.c
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 18 Aug 2019 18:44:58 +0000 (18:44 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 18 Aug 2019 18:44:58 +0000 (18:44 +0000)
This test needs the cpu and machine asserts to be implemented
which hadn't been done for PPC Darwin.  Fixed thus.

gcc/

2019-08-18  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts
for cpu and machine.  Factor 64/32b builtins.

From-SVN: r274623

gcc/ChangeLog
gcc/config/rs6000/darwin.h

index f8a7a12451de7efa5ba411964189e2503f66f5d9..bf0dbe0fb16cc6659409ceafc21af599b26da59f 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-18  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts
+       for cpu and machine.  Factor 64/32b builtins.
+
 2019-08-18  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/install.texi (Specific, bfin): blackfin.uclinux.org is
index 150dc4f4cdd879cc851769a939c3744eca6db733..a626325c2d093d484e9bc439301192d72c604f04 100644 (file)
 #define TARGET_OS_CPP_BUILTINS()                       \
   do                                                   \
     {                                                  \
-      if (!TARGET_64BIT) builtin_define ("__ppc__");   \
-      if (!TARGET_64BIT) builtin_define ("__PPC__");   \
-      if (TARGET_64BIT) builtin_define ("__ppc64__");  \
-      if (TARGET_64BIT) builtin_define ("__PPC64__");  \
       builtin_define ("__POWERPC__");                  \
+      builtin_define ("__PPC__");                      \
+      if (TARGET_64BIT)                                        \
+       {                                               \
+         builtin_define ("__ppc64__");                 \
+         builtin_define ("__PPC64__");                 \
+         builtin_define ("__powerpc64__");             \
+         builtin_assert ("cpu=powerpc64");             \
+         builtin_assert ("machine=powerpc64");         \
+       }                                               \
+      else                                             \
+       {                                               \
+         builtin_define ("__ppc__");                   \
+         builtin_define_std ("PPC");                   \
+         builtin_assert ("cpu=powerpc");               \
+         builtin_assert ("machine=powerpc");           \
+       }                                               \
       builtin_define ("__NATURAL_ALIGNMENT__");                \
       darwin_cpp_builtins (pfile);                     \
     }                                                  \