From: Iain Sandoe Date: Thu, 5 Sep 2019 19:33:01 +0000 (+0000) Subject: [Darwin, PPC] Fix fail of cpp/assert4.c X-Git-Tag: releases/gcc-7.5.0~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e19ff7bbdebd4de58e0e37b2d0ed004d1f82b81;p=thirdparty%2Fgcc.git [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. 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 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-09-05 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. Backport from mainline 2019-06-23 Iain Sandoe * config/rs6000/darwin.h: (__PPC__, __PPC64__): New. From-SVN: r275433 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b11534d410a3..7b533b54e469 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2019-09-05 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. + + Backport from mainline + 2019-06-23 Iain Sandoe + + * config/rs6000/darwin.h: (__PPC__, __PPC64__): New. + 2019-09-05 Iain Sandoe Backport from mainline diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 64d8de5badfc..a04072a5cfb9 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -53,9 +53,23 @@ #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); \ } \