From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbdKIGRH (ORCPT ); Thu, 9 Nov 2017 01:17:07 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:45545 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752128AbdKIGRE (ORCPT ); Thu, 9 Nov 2017 01:17:04 -0500 X-Google-Smtp-Source: ABhQp+RpnqxcfXeJxwhgo/Xwz7NR9HqaWcDJO39GHeIjjQGGNrF9F9PUYU2Vajtb+F9RsWD0xWAuhA== From: Luc Van Oostenryck To: "David S . Miller" Cc: Luc Van Oostenryck , Sam Ravnborg , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] sparc: pass endianness info to sparse Date: Thu, 9 Nov 2017 07:16:52 +0100 Message-Id: <20171109061652.14948-3-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20171109061652.14948-1-luc.vanoostenryck@gmail.com> References: <20171109061652.14948-1-luc.vanoostenryck@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sparc 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: David S. Miller CC: sparclinux@vger.kernel.org Signed-off-by: Luc Van Oostenryck --- arch/sparc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index a42aa114e..08d477faf 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -14,7 +14,7 @@ else KBUILD_DEFCONFIG := sparc64_defconfig endif -CHECKFLAGS += -D__sparc__ +CHECKFLAGS += -D__sparc__ -mbig-endian ifeq ($(CONFIG_SPARC32),y) ##### -- 2.14.0