From 0a8b0a4c6f385536c7afe674df0fda9fe8406a29 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 21 Aug 2019 18:45:45 +0000 Subject: [PATCH] [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 Backport from mainline 2019-08-18 Iain Sandoe * config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts for cpu and machine. Factor 64/32b builtins. From-SVN: r274806 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/darwin.h | 20 ++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7988d827aa02..35223dbfd019 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-08-21 Iain Sandoe + + Backport from mainline + 2019-08-18 Iain Sandoe + + * config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts + for cpu and machine. Factor 64/32b builtins. + 2019-08-20 Eric Botcazou PR rtl-optimization/91347 diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index d3a59f42c374..98ecf0ad2fe6 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); \ } \ -- 2.47.2