Skip to content

Commit ff0c6ee

Browse files
lucvooRussell King
authored andcommitted
ARM: 8716/1: pass endianness info to sparse
ARM depends on the macros '__ARMEL__' & '__ARMEB__' being defined or not 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 passing '-D__ARMEL__' or '-D__ARMEB__' to sparse, depending on the endianness of the kernel, like defined by GCC. Note: In most case it won't change anything since most ARMs use little-endian (but an allyesconfig would use big-endian!). To: Russell King <linux@armlinux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent 29f9007 commit ff0c6ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ endif
4444

4545
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
4646
KBUILD_CPPFLAGS += -mbig-endian
47+
CHECKFLAGS += -D__ARMEB__
4748
AS += -EB
4849
LD += -EB
4950
else
5051
KBUILD_CPPFLAGS += -mlittle-endian
52+
CHECKFLAGS += -D__ARMEL__
5153
AS += -EL
5254
LD += -EL
5355
endif

0 commit comments

Comments
 (0)