[PATCH] m68k: pass endianness info to sparse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <geert@xxxxxxxxxxxxxx>
CC: linux-m68k@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 arch/m68k/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index f0dd9fc84..74f05eb72 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -76,7 +76,7 @@ ifdef CONFIG_SUN3
 LDFLAGS_vmlinux = -N
 endif
 
-CHECKFLAGS += -D__mc68000__
+CHECKFLAGS += -D__mc68000__ -mbig-endian
 
 
 ifdef CONFIG_KGDB
-- 
2.14.0

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux