Skip to contentSkip to conversation

m68k: pass endianness info to sparse

PATCH New Luc Van Oostenryck 1 participant 1 message Oct 31, 2017 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: pass endianness info to sparse

m68k is big-endian only but sparse assumes the same endianness as the building machine.
This is problematic for code which expect __BYTE_ORDER__ being correctly predefined by the compiler which sparse can then pre-process differently from what gcc would, depending on the building machine endianness.

Fix this by letting sparse know about the architecture endianness.

To: Geert Uytterhoeven <[email protected]>

---
 arch/m68k/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/Makefile +1 -1
index f0dd9fc84..74f05eb72 100644
@@ -76,7 +76,7 @@ ifdef CONFIG_SUN3
 LDFLAGS_vmlinux = -N
 endif
 
-CHECKFLAGS += -D__mc68000__
+CHECKFLAGS += -D__mc68000__ -mbig-endian
 
 
 ifdef CONFIG_KGDB
Signature · 1 line
2.14.0