Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp134574ybk; Tue, 19 May 2020 17:40:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy20yT6E0Ku9ktBtC2pwKQAYCZ589U7l7r0UluGk7jMIDQeP5OHjBNIucF1NNe5N8pwsYwl X-Received: by 2002:a17:906:55c4:: with SMTP id z4mr1780182ejp.332.1589935246650; Tue, 19 May 2020 17:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589935246; cv=none; d=google.com; s=arc-20160816; b=l+HGOPw3XGrLhASZfZV2XBT1Tc2hEIdEUf8SDQMxuVxHyYUogu2KADKz7EA9/ZAY4g 5OUJYVsWFXFxPXyST4u0Q8T4XcKTDfP6AHkXo6UW96TekXML/Ib6tOVo/u0bPwlIGaJf oZhcFvShcAM3w/BagRW/QJqoW9QP0Vjk02lhk8DUYOb1RyEb7N9RO0fBQ5QLlkmLOnmb B1hb82ZC8Cblqb++b6B+EAUlg2JV1DRn+TuUegFYk7gArs57IjktocUaQN820jfdAUDu EDn/1AL1xDRyGr3hIvFSmLAGc983IpwkQRzoRB1ZwHHgB/XhHkbcGIiX6xcP8rEz9ake 8kDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LUd/WgjoZPsx+toSaRGP/ejM9YY6HjPYSZOKYhK7Aq4=; b=P+quZ0OHORW5Y1abmUKSDmKPrkIUiccs+uedmYLEOIauGbN4SgerQEvgKPvn0mYsgu 05HzZTV3Zh5C5hvbJpSUVzGXGuGRFs5UNDosAySqGgiSWTnn5E6Vrkud6A3FuDMQDYEt w/wgxYxP+IYGgnF9Nqe4jJeO66X2uO5zY5IySXaJuTERO4qHKYytUHfwlAg2lO/AMvku rlr0XlSMkfreCIiNXTrLVK/MuTkLa8jEnh5ASXTNvqkyoyq+ZN/3uG5y2S8GiNhablpO OujCzMJn64Zs+0XZ6G35eI9+kMD1dllQuNY0mkeyZOrMg6Nlig/8e09+hNDCCi/rLH/c /8VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FcZxfBfH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si869790eja.287.2020.05.19.17.40.22; Tue, 19 May 2020 17:40:46 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=FcZxfBfH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726595AbgETAi5 (ORCPT + 99 others); Tue, 19 May 2020 20:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbgETAi4 (ORCPT ); Tue, 19 May 2020 20:38:56 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EC8C061A0E for ; Tue, 19 May 2020 17:38:56 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id z26so712538pfk.12 for ; Tue, 19 May 2020 17:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LUd/WgjoZPsx+toSaRGP/ejM9YY6HjPYSZOKYhK7Aq4=; b=FcZxfBfHJ/OI6RRmKYEaeLCAdglZPcdKY04CaufK/RV3QdW3p2Q7xLCONkzEkxmwF9 6U57NQNUqXw15Qm+aITU0/QV/BoxdY2UiVj9Ot+RvuNdefgzXXGS8RTSeX//wZrypEK7 3OLBRzguhKnOJp8khZh94qz69ZRm7+XReh1na6pKOfXcnAE7frtjtzVQeWZaI/6v0z6d TS67jkZIFBB5rX4oyCUl1McYwEOxEabF8tnnh4N0dy+TylPKFBXfSwfID+3M8w9YsOvN gZlaLIHHCv3ckZ+YzWc0GrpZhgkdh/1HvHut7d+oUbc3eXxC1wrTsNoBSDz4DH58X2tw G6Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LUd/WgjoZPsx+toSaRGP/ejM9YY6HjPYSZOKYhK7Aq4=; b=sPA2aHiLi3l8WZK/HDUb/cNeh4bSYhax9m3UgcXRbvYuoZw1OTTabpi+Zwj+TouNWC Xu6gE+yUOn/D7Ap4UX56g3Znx6XFIy/y1GXdr4IbLJumTfLIsbJ3w3lV1rAC2p1gM2os lPyDFrIeeDwlAlbcnEI+Mcay04l4N6nU62AAn261zwO1lVVM/X/EgerB01l18/aeW2Xs HpoCHwoHSyD8CU4V0KW6t8qw9ehD0z6Zi5IxWdqoQUiZojw/NbQmle5ZqlAThgr+zZIF +f/09oSiFVown/h0qmsDdDaM6GI2nf39itBA3SfJXN2Q4/dooI6izmri6uTSKZiJ1EMM D9zg== X-Gm-Message-State: AOAM531F9Qg5LCrOIQxAMOouxA3V9KQY8RlO4tntKwrXCbv10h/rG/MH jMHJmhKoLdJiNX/rCDaNj+N5ZZwmAUSZGRsNH1Y7mA== X-Received: by 2002:aa7:8084:: with SMTP id v4mr1674036pff.39.1589935136101; Tue, 19 May 2020 17:38:56 -0700 (PDT) MIME-Version: 1.0 References: <20200519220923.1601303-1-arnd@arndb.de> In-Reply-To: From: Nick Desaulniers Date: Tue, 19 May 2020 17:38:44 -0700 Message-ID: Subject: Re: [PATCH] ARM: pass -msoft-float to gcc earlier To: Arnd Bergmann Cc: Russell King , Szabolcs Nagy , Masahiro Yamada , Linus Walleij , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sorry, hit tab/enter too soon... On Tue, May 19, 2020 at 5:37 PM Nick Desaulniers wrote: > > On Tue, May 19, 2020 at 3:09 PM Arnd Bergmann wrote: > > > > 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. > > The call to `$(call cc-option, -march=armv7-a) is th The call to `$(call cc-option, -march=armv7-a) is the one that fails or...? > > > > > Move the option to the beginning the Makefile, before we call > > beginning of the > > > 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 > > Moving this looks harmless enough, though it's not clear to me how the > failure you're describing would occur. I don't see calls to as-instr > in arch/arm/Makefile. Which object is being built before -msoft-float > is being set? ... ^ > > > --- > > 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 > > -- Thanks, ~Nick Desaulniers