From ac8678f1a5f2294823343af49a938d755200f67a Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Tue, 31 Oct 2017 18:22:05 +0100 Subject: [PATCH] openrisc: pass endianness info to sparse openrisc 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: Jonas Bonn To: Stefan Kristiansson To: Stafford Horne Signed-off-by: Luc Van Oostenryck Signed-off-by: Stafford Horne --- arch/openrisc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile index 89076a66eee26..cf88029628643 100644 --- a/arch/openrisc/Makefile +++ b/arch/openrisc/Makefile @@ -25,6 +25,7 @@ LDFLAGS_vmlinux := LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ +CHECKFLAGS += -mbig-endian ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) KBUILD_CFLAGS += $(call cc-option,-mhard-mul) -- 2.39.5