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 7e0ae8f..4a8a6ff 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))