From: Luc Van Oostenryck Date: Tue, 31 Oct 2017 17:22:02 +0000 (+0100) Subject: c6x: pass endianness info to sparse X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=85fa2cc51104ee5b529ce85b12f4c8421888544f;p=openwrt%2Fstaging%2Fblogic.git c6x: pass endianness info to sparse c6x depends on the macro '_BIG_ENDIAN' being defined or not to correctly select or define endian-specific macros, structures or pieces of code. This macro is predefined by the compiler but sparse knows nothing about it and thus may pre-process files differently from what gcc would. Fix this by passing '-D_BIG_ENDIAN' when compiling a big-endian kernel, like GCC would have done. To: Mark Salter To: Aurelien Jacquiot CC: linux-c6x-dev@linux-c6x.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Mark Salter --- diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index 6f6096ff05a4..6ab942e6c534 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile @@ -25,6 +25,7 @@ KBUILD_AFLAGS += -mbig-endian LINKFLAGS += -mbig-endian KBUILD_LDFLAGS += -mbig-endian LDFLAGS += -EB +CHECKFLAGS += -D_BIG_ENDIAN endif head-y := arch/c6x/kernel/head.o