Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6958560rwp; Tue, 18 Jul 2023 08:06:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFNXDbkNUM/6qzf71/jBQJFCBaCeyAEe7zjPFiO7MgGLqsOhRGLZ9SEl9kiquUHjGrih2X X-Received: by 2002:a17:907:2bf2:b0:993:ffcb:ad52 with SMTP id gv50-20020a1709072bf200b00993ffcbad52mr156859ejc.23.1689692809610; Tue, 18 Jul 2023 08:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689692809; cv=none; d=google.com; s=arc-20160816; b=WMJULk2xRHNTqXNe2GU7OaDYjV5U8pNUK9tJqVpOsMZsbyBo3hfu2LW5NaBe9jWweI XdWTP0MZF5RR6/yx+s3h8MaH5B7AoIOpRtZzyBcjhcnNmAb2C2j4nuGAFsSHVLV4mj29 lxqqHXGGLuEjJyOtZTe8Qmesapb8WaxCxc2BmMTtTsLtxkhIuEYOk3oL+1EFn7x3wjrh oiYJtWRVaEvGTmikvzMqXco/DQa9luwz7or0p6k/P9/64+9PrQekv4eNE23rP22wWS1q f2WO3JA+FfXWDHzR/PCbN4OTshhYbGXpqjx/wKkedCilMtiS6MSW3+uWczjfrs1Xv2HU SfqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=MN4x/rspgQI5sZJwnxf9RD/KEnsmTPuAdxYkRAb77Jk=; fh=P85sgKSvNQe6MVBZ08U/jxZ3RFAsvXQU0IKq4FeHi9Q=; b=aDXYfo8++0ciO5yjHQvri4hSq2/JWdUNc19bfUMXRDJuYHr6GA9r4F5W1YkIM8UqFu IBYqckjRuPzuZPX8YTA6BwC/IwQaOjBMeTWju+5sQWVEH7f4ykNu58D+HO+7w19qsCN2 9RHGRQ6iiW+8ZvfS1L8V+ToDeV6570rH41AasCX3TEO5IKAdtrhoDgsuhI1JFoXFoBYk mYRyk5bZ8WpklhEC9/dt9kGQxmeDNFaTXQQKxq+C3dRCceUbMMPpcCtHxwoilEvIf6hI VWTJSe0qekpk6veCM1FBRZ+D5WUd0KD3Y5i4YKSEivLgjAcpVWIVO+gWXbbuSq0FAurM Ys3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kq14-20020a170906abce00b0098d2f715b89si1134373ejb.102.2023.07.18.08.06.23; Tue, 18 Jul 2023 08:06:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233023AbjGROhg (ORCPT + 99 others); Tue, 18 Jul 2023 10:37:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232884AbjGROhb (ORCPT ); Tue, 18 Jul 2023 10:37:31 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 928D6EC; Tue, 18 Jul 2023 07:37:28 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id CE56592009D; Tue, 18 Jul 2023 16:37:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id CB4C492009C; Tue, 18 Jul 2023 15:37:27 +0100 (BST) Date: Tue, 18 Jul 2023 15:37:27 +0100 (BST) From: "Maciej W. Rozycki" To: Thomas Bogendoerfer cc: Jan-Benedict Glaw , Guillaume Tucker , Huacai Chen , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] Revert MIPS: Loongson: Fix build error when make modules_install In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Revert commit 531b3d1195d0 ("MIPS: Loongson: Fix build error when make modules_install"), which made `-march=loongson2e', `-march=loongson2f', and `-march=loongson3a' compilation options probed for even though GCC has supported them since 4.4.0, 4.4.0, and 4.6.0 respectively, which is below our current minimum requirement of 5.1, in an attempt to work around for the `cc-option' `make' function being undefined with `make' targets that do not use the compiler. The workaround has now been made obsolete, by querying the `need-compiler' variable instead so as to make sure the compiler isn't called for non-build targets. Verified with `fuloong2e_defconfig' and the `modules_install' target. Signed-off-by: Maciej W. Rozycki --- arch/mips/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Index: linux-macro/arch/mips/Makefile =================================================================== --- linux-macro.orig/arch/mips/Makefile +++ linux-macro/arch/mips/Makefile @@ -181,12 +181,16 @@ endif cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap -cflags-$(CONFIG_CPU_LOONGSON2E) += $(call cc-option,-march=loongson2e) -Wa,--trap -cflags-$(CONFIG_CPU_LOONGSON2F) += $(call cc-option,-march=loongson2f) -Wa,--trap -cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-march=loongson3a,-march=mips64r2) -Wa,--trap +cflags-$(CONFIG_CPU_LOONGSON2E) += -march=loongson2e -Wa,--trap +cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f -Wa,--trap # Some -march= flags enable MMI instructions, and GCC complains about that # support being enabled alongside -msoft-float. Thus explicitly disable MMI. cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi) +ifdef CONFIG_CPU_LOONGSON64 +cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap +cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a +cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2 +endif cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-mno-loongson-mmi) cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,)