]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Darwin, PPC] Fix fail of cpp/assert4.c
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 21 Aug 2019 18:45:45 +0000 (18:45 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Wed, 21 Aug 2019 18:45:45 +0000 (18:45 +0000)
This test needs the cpu and machine asserts to be implemented
which hadn't been done for PPC Darwin.

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

Backport from mainline
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: r274806

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

index 7988d827aa02a8b9be5c46fed83024f69c8c4d8b..35223dbfd019fed33218c5fc83962560e46988ad 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-21  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline
+       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-20  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR rtl-optimization/91347
index d3a59f42c374549545138ea29967fcc8f9ba6cbe..98ecf0ad2fe66150d61606861db5825fb662b9b1 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);                     \
     }                                                  \