Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753923AbdJaRWW (ORCPT ); Tue, 31 Oct 2017 13:22:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:49977 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753982AbdJaRWQ (ORCPT ); Tue, 31 Oct 2017 13:22:16 -0400 X-Google-Smtp-Source: ABhQp+RfGU1DPOI7tpoBpTDYUO7c3/hUqXdLPboqAtZqwf7zueRXqp7QQw78djfKRcanIyqQwRLmaA== From: Luc Van Oostenryck To: trivial@kernel.org Cc: Luc Van Oostenryck , linux-kernel@vger.kernel.org Subject: [PATCH] m32r: pass endianness info to sparse Date: Tue, 31 Oct 2017 18:22:13 +0100 Message-Id: <20171031172213.10039-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.14.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org m32r 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: trivial@kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Luc Van Oostenryck --- arch/m32r/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index def8dd0b6..fbdaf03a6 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile @@ -29,7 +29,7 @@ aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst KBUILD_CFLAGS += $(cflags-y) KBUILD_AFLAGS += $(aflags-y) -CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 +CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 -mbig-endian head-y := arch/m32r/kernel/head.o -- 2.14.0