aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-10-31 13:19:15 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2017-11-01 15:14:49 -0400
commitff0c6eecef59d6f949bbc09d117f2527ae1d4e34 (patch)
tree6013601c7b01a4ac0987187d3b400c98754f0a93
parent29f9007b3182ab3f328a31da13e6b1c9072f7a95 (diff)
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>
-rw-r--r--arch/arm/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 817e5cfef83a..36ae4454554c 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -44,10 +44,12 @@ endif
44 44
45ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 45ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
46KBUILD_CPPFLAGS += -mbig-endian 46KBUILD_CPPFLAGS += -mbig-endian
47CHECKFLAGS += -D__ARMEB__
47AS += -EB 48AS += -EB
48LD += -EB 49LD += -EB
49else 50else
50KBUILD_CPPFLAGS += -mlittle-endian 51KBUILD_CPPFLAGS += -mlittle-endian
52CHECKFLAGS += -D__ARMEL__
51AS += -EL 53AS += -EL
52LD += -EL 54LD += -EL
53endif 55endif