aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-08 02:49:40 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-09 14:02:03 +0100
commit3c3881cf1c68f1b4ec4e5a68fa0aa92e88eb275c (patch)
treee22038e2237dd834a6bdc147d33dd7e2c4796e1a /lib.c
parent2ec21ceee59e08813403bd0425e493a31e750b00 (diff)
downloadsparse-dev-3c3881cf1c68f1b4ec4e5a68fa0aa92e88eb275c.tar.gz
cgcc: let sparse define _BIG_ENDIAN
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>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index fbf14282..fd45da5d 100644
--- a/lib.c
+++ b/lib.c
@@ -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: