]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Darwin, PPC] Fix fail of cpp/assert4.c
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 5 Sep 2019 19:33:01 +0000 (19:33 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Thu, 5 Sep 2019 19:33:01 +0000 (19:33 +0000)
This test needs the cpu and machine asserts to be implemented
which hadn't been done for PPC Darwin. We also need to emit
__PPC__ for 32/64b and __PPC64__, __powerpc64__ (64bit) as per
the other members of the PowerPC port.

2019-08-27 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-09-05  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.

Backport from mainline
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h: (__PPC__, __PPC64__): New.

From-SVN: r275433

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

index b11534d410a36c95a4491e654c7be41676639b6b..7b533b54e469b253ce927de8747f64d08db35a70 100644 (file)
@@ -1,3 +1,16 @@
+2019-09-05  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.
+
+       Backport from mainline
+       2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/rs6000/darwin.h: (__PPC__, __PPC64__): New.
+
 2019-09-05  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline
index 64d8de5badfc79e4295de1f9a922400e8e87b1f3..a04072a5cfb994de1a95dfbbf440b0b64737e22e 100644 (file)
 #define TARGET_OS_CPP_BUILTINS()                       \
   do                                                   \
     {                                                  \
-      if (!TARGET_64BIT) builtin_define ("__ppc__");   \
-      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);                     \
     }                                                  \