Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp49509ybk; Tue, 19 May 2020 15:12:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwf6F1LJuY4BNganiTtEhKsKn8ylNdpgALYFrV56cErXEHVmLEgtccNx3jIkyQbSQYXUL8 X-Received: by 2002:a17:906:81ce:: with SMTP id e14mr1243268ejx.76.1589926356477; Tue, 19 May 2020 15:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589926356; cv=none; d=google.com; s=arc-20160816; b=E+5pyRBXr/SG0ah7F0teUgSobpi6Mgsv9ImPe8LJcm2G0BRXzw0DFurRFpiVak/Id8 m6cUGkgBck5Yim0YQYFgGSkUxipW7nMz0M1CUD1SOcqYrXHayfibH38grn3rVB5W0HWz VvQzYpK517w8qg+KfEoYtAN+B2zagwAaFEg+3eMoDtzImT3rzVkZhbpe3h9ic61BTe76 g7nA/qqTnuwvjfh6Xcl4SsHpnEW3Brk5EY965E6oBBL2adck1tv82GVdt5p90UomnlY9 pQAkbzTI4rEwbDIN6uX6E2HmE/7uDx/Qt719f9AwyfpyGMqcqFbEz7HSRTUhAGREeQ73 ANKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=U9VMaLnc9ZlkMBN9j0yIkBaSeVdFOHaq3IlN/FhzX4o=; b=esCaT1vVwvdu5BxGhKYm1X3VtC5NmloL5iI+lHB3LESPtFoIzVFY9jpVHVTNz0B7Rj n9ncjMErjMBd8QS7NEKHRhgEXKW0Zex7lK2y45leHBhPdlmPDxpOPG/0Ibd9Eu8AWDwL ZCjkXIUV+a+MMJYJNfFZM4mAwIrJhEBEocOJ9z0J8jX62tiArAHcCNCJW6NSNUyGX2o7 gYv9z5Kfw/rWhaSNkVxlv16luyxEas8KItytgHyaG/OdBCGA9FU4+RIu8YyPmBoxaymP 5BIQqgYHcePJUlRTMaSELvldFUt75G4Pzll0l+3XYwQXkyk6jpGIiYyOvXlr4d4E0YYc hF5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu21si385000edb.485.2020.05.19.15.12.12; Tue, 19 May 2020 15:12:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbgESWJr (ORCPT + 99 others); Tue, 19 May 2020 18:09:47 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:55601 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgESWJq (ORCPT ); Tue, 19 May 2020 18:09:46 -0400 Received: from localhost.localdomain ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mj8Vx-1j5fUO0KHd-00f6z6; Wed, 20 May 2020 00:09:33 +0200 From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Szabolcs Nagy , Masahiro Yamada , Nick Desaulniers , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: pass -msoft-float to gcc earlier Date: Wed, 20 May 2020 00:08:55 +0200 Message-Id: <20200519220923.1601303-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:wV6x9QxzVEAmfgleaEmiJ1+1+ez2lYlhCOI97T7b7A0kkt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abeqVMPMT30WUTInGbL2lHjVL8Hw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Szabolcs Nagy ran into a kernel build failure with a custom gcc toochain that sets -mfpu=auto -mfloat-abi=hard: /tmp/ccmNdcdf.s:1898: Error: selected processor does not support `cpsid i' in ARM mode The problem is that $(call cc-option, -march=armv7-a) fails before the kernel overrides the gcc options to also pass -msoft-float. Move the option to the beginning the Makefile, before we call cc-option for the first time. Reported-by: Szabolcs Nagy Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87302 Signed-off-by: Arnd Bergmann --- arch/arm/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 7d5cd0f85461..e428ea6eb0fa 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -16,6 +16,8 @@ LDFLAGS_vmlinux += --be8 KBUILD_LDFLAGS_MODULE += --be8 endif +KBUILD_CFLAGS += -msoft-float + ifeq ($(CONFIG_ARM_MODULE_PLTS),y) KBUILD_LDS_MODULE += $(srctree)/arch/arm/kernel/module.lds endif @@ -135,7 +137,7 @@ AFLAGS_ISA :=$(CFLAGS_ISA) endif # Need -Uarm for gcc < 3.x -KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm +KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -Uarm KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float CHECKFLAGS += -D__arm__ -- 2.26.2