xtensa: provide endianness macro for sparse
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 10 Dec 2012 21:26:25 +0000 (01:26 +0400)
committerChris Zankel <chris@zankel.net>
Wed, 19 Dec 2012 05:10:25 +0000 (21:10 -0800)
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/Makefile

index 7e0ae8fd4da8670834321bcf6c0f3507d79385a0..4a8a6ffb68bad4e43f1b3236dbf6ca638b9c30c5 100644 (file)
@@ -54,6 +54,13 @@ ifneq ($(CONFIG_LD_NO_RELAX),)
 LDFLAGS := --no-relax
 endif
 
+ifeq ($(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1)
+CHECKFLAGS += -D__XTENSA_EB__
+endif
+ifeq ($(shell echo -e __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1)
+CHECKFLAGS += -D__XTENSA_EL__
+endif
+
 vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
 plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))