Hi Olivier, On Thu, Oct 01, 2020 at 11:30:55AM +0200, Olivier Hainque wrote: > This change reworks CPP_BUILTINS_SPEC for powerpc-vxworks to > prepare for the upcoming addition of 32 and 64 bit ports for > VxWorks 7r2.
Cool, looking forward to it! Your attachment is not quotable (it is application/octet-stream), so I'll paste it in here, hopefully correct: --- a/gcc/config/rs6000/vxworks.h +++ b/gcc/config/rs6000/vxworks.h @@ -26,21 +26,56 @@ along with GCC; see the file COPYING3. If not see /* CPP predefined macros. */ #undef TARGET_OS_CPP_BUILTINS -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__ppc"); \ - builtin_define ("__PPC__"); \ - builtin_define ("__EABI__"); \ - builtin_define ("__ELF__"); \ - if (!TARGET_SOFT_FLOAT) \ - builtin_define ("__hardfp"); \ +#define TARGET_OS_CPP_BUILTINS() \ Hrm, you changed a lot of white space, was that on purpose? + do \ + { \ + /* CPU macros. */ \ + builtin_define ("__ppc"); \ + builtin_define ("__ppc__"); \ + builtin_define ("__PPC"); \ + builtin_define ("__PPC__"); \ + builtin_define ("__powerpc"); \ + builtin_define ("__powerpc__"); \ + if (TARGET_64BIT) \ + { \ + builtin_define ("__ppc64"); \ + builtin_define ("__ppc64__"); \ + builtin_define ("__PPC64"); \ + builtin_define ("__PPC64__"); \ + builtin_define ("__powerpc64"); \ + builtin_define ("__powerpc64__"); \ + } \ Are all those new names actually defined by your ABIs? If not, this is counter-productive: it does not help anyone if there are six ways to write things, where not all ways are supported by all compilers! (Including older versions of the same compilers.) - /* C89 namespace violation! */ \ - builtin_define ("CPU_FAMILY=PPC"); \ + builtin_define ("CPU_FAMILY=PPC"); \ You removed the comment, but it is rather important still? Of course the "C89" part of it is dated, but it is true for all newer language standards just the same. Cheers, Segher