aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2019-08-21 18:45:45 +0000
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2019-08-21 18:45:45 +0000
commitb4f5611c4c36867739e281e6c0ad4346031b2dd4 (patch)
treee7de39777a60271ea732ddee0b934013d68714f5
parenta4c9e27e14b004ea2f8543fada104c4c62b7a698 (diff)
[Darwin, PPC] Fix fail of cpp/assert4.c
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@274806 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/rs6000/darwin.h20
2 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7988d827aa0..35223dbfd01 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index d3a59f42c37..98ecf0ad2fe 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -53,11 +53,23 @@
#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); \
} \