From patchwork Tue Nov 9 15:01:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12610799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA65C433EF for ; Tue, 9 Nov 2021 15:02:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 833DD604D7 for ; Tue, 9 Nov 2021 15:02:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236248AbhKIPE7 (ORCPT ); Tue, 9 Nov 2021 10:04:59 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:49280 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236035AbhKIPE6 (ORCPT ); Tue, 9 Nov 2021 10:04:58 -0500 X-Greylist: delayed 168096 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Nov 2021 10:04:58 EST Received: from grover.. (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-10.nifty.com with ESMTP id 1A9F1mTt012230; Wed, 10 Nov 2021 00:01:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 1A9F1mTt012230 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1636470108; bh=/ijbM1TP6K+JTP7BiPh1WBRya5K6GRIV8U9h0I8JScs=; h=From:To:Cc:Subject:Date:From; b=zXzDGBnDPOrHRZXkE4rN0IXgnOBuTn78Mq9FB2Z1XFV5hHfG1gTxc8xyj4ghBVhmU LuErClpZhazvGX/MFWxCQsdxN7VMt3YRoHmLjXZp+uG0VcdGmeT4l86y33HYqZSaYO i2oz0xtaD252/fWpG476VgCbx/HwbrWfXxGAIus93Y4ZGRdHATDY+ByX2krFTVAqdY IF4RpDywGwf8SVNfG0g49ZXI+RoJCz3o5HkQku50Hpmo9Ce+PCHMaKH2zHBCScHM+b zIglKVVC3Etiw5+/NA2B+Pucg37gBjULRoMK76crIK167RviB6jLW7IhF2UmjHQaFA KYoerpqWtEu3g== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: Thomas Bogendoerfer , linux-mips@vger.kernel.org Cc: Masahiro Yamada , Jason Self , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Date: Wed, 10 Nov 2021 00:01:45 +0900 Message-Id: <20211109150146.529428-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Since commit 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed"), package builds for the loongson2f platform fail. $ make ARCH=mips CROSS_COMPILE=mips64-linux- lemote2f_defconfig bindeb-pkg [ snip ] sh ./scripts/package/builddeb arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop. cp: cannot stat '': No such file or directory make[5]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 1 make[4]: *** [Makefile:1558: intdeb-pkg] Error 2 make[3]: *** [debian/rules:13: binary-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[2]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2 make[1]: *** [Makefile:1558: bindeb-pkg] Error 2 make: *** [Makefile:350: __build_one_by_one] Error 2 The reason is because "make image_name" fails. $ make ARCH=mips CROSS_COMPILE=mips64-linux- image_name arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop. In general, adding $(error ...) in the parse stage is troublesome, and it is pointless to check toolchains even if we are not building anything. Do not include Kbuild.platform in such cases. Fixes: 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed") Reported-by: Jason Self Signed-off-by: Masahiro Yamada --- arch/mips/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index e036fc025ccc..ace7f033de07 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -253,7 +253,9 @@ endif # # Board-dependent options and extra files # +ifdef need-compiler include $(srctree)/arch/mips/Kbuild.platforms +endif ifdef CONFIG_PHYSICAL_START load-y = $(CONFIG_PHYSICAL_START) From patchwork Tue Nov 9 15:01:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12610801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CE2CC433EF for ; Tue, 9 Nov 2021 15:02:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F04A061052 for ; Tue, 9 Nov 2021 15:02:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237227AbhKIPFK (ORCPT ); Tue, 9 Nov 2021 10:05:10 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:49574 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236541AbhKIPFJ (ORCPT ); Tue, 9 Nov 2021 10:05:09 -0500 Received: from grover.. (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-10.nifty.com with ESMTP id 1A9F1mTu012230; Wed, 10 Nov 2021 00:01:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 1A9F1mTu012230 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1636470109; bh=HQBhKd+2a9EYQ4Edzp8nwK+DQW3sKO64V/FEVyFYgC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HyZcgokZUex3iKnQios/fLqzYxndqNBAKvOt/n9mE/PnNuy36ZRr00KJaAKD8cgyL DMnJCZUsSrw0Csu0zWDrZN+v0Q1J76lQWnPt5wFyHLv3S9yMqMjTRgxBK5lEAFoagQ ujBgPa1ksSI/kHZIcZFp9fEd0KgekkWlTgk4Zdl/oL5INLgeuarXih/GVODrn+8Ra+ NQi9HVmzDD4bbGPRk5MvbnrLs8bheYnd80U1ARXRv6W5XkecSQ7j0ejWVAjZ+7dstM Z1sOpUGTCHu84mvF/jJsVhd3Aif2j5GR2aofJiXwWM4VpLEACyhaTneqFZjNDr8YnJ g8ANAPCA8qrEQ== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: Thomas Bogendoerfer , linux-mips@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path Date: Wed, 10 Nov 2021 00:01:46 +0900 Message-Id: <20211109150146.529428-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211109150146.529428-1-masahiroy@kernel.org> References: <20211109150146.529428-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org platform-y accumulates platform names with a slash appended. The current $(patsubst ...) ends up with doubling slashes. GNU Make still include Platform files, but in case of an error, a clumsy file path is displayed: arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop. Signed-off-by: Masahiro Yamada --- arch/mips/Kbuild.platforms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms index 2c57994b5217..30193bcf9caa 100644 --- a/arch/mips/Kbuild.platforms +++ b/arch/mips/Kbuild.platforms @@ -37,4 +37,4 @@ platform-$(CONFIG_MACH_TX49XX) += txx9/ platform-$(CONFIG_MACH_VR41XX) += vr41xx/ # include the platform specific files -include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platform-y)) +include $(patsubst %/, $(srctree)/arch/mips/%/Platform, $(platform-y))