summaryrefslogtreecommitdiffstats
path: root/arch/nds32
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-05-28 18:29:02 +0200
committerGreentime Hu <greentime@andestech.com>2018-06-19 15:41:18 +0800
commit97d1e3dc8d98f97b65350f8ab221e6d061705abc (patch)
treee4b8956a7b992858f8eea2e2386f5b76a2de36c6 /arch/nds32
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-0-day-97d1e3dc8d98f97b65350f8ab221e6d061705abc.tar.gz
linux-0-day-97d1e3dc8d98f97b65350f8ab221e6d061705abc.tar.xz
nds32: define __NDS32_E[BL]__ for sparse
nds32 depends on the macros '__NDS32_E[BL]__' to correctly select or define endian-specific macros, structures or pieces of code. These macros are predefined by the compiler but sparse knows nothing about them and thus may pre-process files differently from what GCC would. Fix this by adding '-D__NDS32_E[BL]__' to CHECKFLAGS. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Greentime Hu <greentime@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32')
-rw-r--r--arch/nds32/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
index 513bb2e9baf9f..031c676821ff8 100644
--- a/arch/nds32/Makefile
+++ b/arch/nds32/Makefile
@@ -34,10 +34,12 @@ ifdef CONFIG_CPU_LITTLE_ENDIAN
KBUILD_CFLAGS += $(call cc-option, -EL)
KBUILD_AFLAGS += $(call cc-option, -EL)
LDFLAGS += $(call cc-option, -EL)
+CHECKFLAGS += -D__NDS32_EL__
else
KBUILD_CFLAGS += $(call cc-option, -EB)
KBUILD_AFLAGS += $(call cc-option, -EB)
LDFLAGS += $(call cc-option, -EB)
+CHECKFLAGS += -D__NDS32_EB__
endif
boot := arch/nds32/boot