aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-08-18 18:44:58 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-08-18 18:44:58 +0000
commitda92beb3726e8acafe0301fdf0d3381a33d0ccd4 (patch)
tree9a608cf5b27db893344977f06c0bebd45548b2cf
parent77c64c34c9ffc0ddd8310de3e2e42de3052bf62f (diff)
downloadgcc-da92beb3726e8acafe0301fdf0d3381a33d0ccd4.zip
gcc-da92beb3726e8acafe0301fdf0d3381a33d0ccd4.tar.gz
gcc-da92beb3726e8acafe0301fdf0d3381a33d0ccd4.tar.bz2
[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. 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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/darwin.h20
2 files changed, 21 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f8a7a12..bf0dbe0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 150dc4f..a626325 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -52,11 +52,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); \
} \