@@ -276,8 +276,7 @@ sub add_specs {
return (' --arch=x86_64' .
&float_types (1, 1, 33, [24,8], [53,11], [113,15]));
} elsif ($spec eq 'ppc') {
- return (' -D_BIG_ENDIAN' .
- ' --arch=ppc' .
+ return (' --arch=ppc' .
&float_types (1, 1, 21, [24,8], [53,11], [113,15]));
} elsif ($spec eq 'ppc64') {
return (
@@ -1514,6 +1514,8 @@ static void predefined_macros(void)
predefine("__powerpc", 1, "1");
predefine("__ppc__", 1, "1");
predefine("__PPC__", 1, "1");
+ if (arch_big_endian)
+ predefine("_BIG_DEBIAN", 1, "1");
break;
case MACH_RISCV64:
case MACH_RISCV32:
In addition of __BIG_ENDIAN__, gcc defines _BIG_ENDIAN on powerpc (32 & 64-bit). cgcc does that too but this may also beeneeded when using sparse itself. So, move this define the the sparse code. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- cgcc | 3 +-- lib.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-)