From: Olivier Hainque Date: Wed, 28 Oct 2020 18:04:32 +0000 (+0000) Subject: Predefine __ppc and __ppc__ for VxWorks 7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=17e8da49bfe6a91d13d30888cb9cea0ee255b945;p=gcc.git Predefine __ppc and __ppc__ for VxWorks 7 Unfortunately, some VxWorks 7r2 system headers rely on a couple more variations of the predefined macros expected to characterize a "powerpc" target that we discussed recently. setjmp.h, for example, relies on __ppc and the absence of a definition results in "gcc" dejagnu test failures from all the tests #including that header, which stumble on: #error "_JBLEN not set!" The other case is __ppc__ expected by yvals.h, key to libstdc++. This change adjusts the VxWorks 7 section of our configuration to honor those expectations. 2020-10-29 Olivier Hainque gcc/ * config/rs6000/vxworks.h (TARGET_OS_CPP_BUILTINS): Also builtin_define __ppc and __ppc__ for VxWorks 7. --- diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h index 9dabdab323a..51a3250f5dc 100644 --- a/gcc/config/rs6000/vxworks.h +++ b/gcc/config/rs6000/vxworks.h @@ -70,6 +70,12 @@ along with GCC; see the file COPYING3. If not see builtin_define ("__PPC"); \ builtin_define ("__powerpc"); \ } \ + \ + /* __ppc isn't emitted by the system compiler \ + any more but a few system headers still depend \ + on it, as well as on __ppc__. */ \ + builtin_define ("__ppc"); \ + builtin_define ("__ppc__"); \ } \ \ /* Asserts for #cpu and #machine. */ \