From patchwork Fri Nov 10 07:35:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao jin X-Patchwork-Id: 10052491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C4FA603FA for ; Fri, 10 Nov 2017 07:35:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 009FC2B271 for ; Fri, 10 Nov 2017 07:35:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E75492B27B; Fri, 10 Nov 2017 07:35:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6892F2B271 for ; Fri, 10 Nov 2017 07:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750847AbdKJHfR (ORCPT ); Fri, 10 Nov 2017 02:35:17 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:59658 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750756AbdKJHfR (ORCPT ); Fri, 10 Nov 2017 02:35:17 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="30076228" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 10 Nov 2017 15:35:15 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 11D1548089F5; Fri, 10 Nov 2017 15:35:12 +0800 (CST) Received: from Tsao.g08.fujitsu.local (10.167.226.60) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 10 Nov 2017 15:35:12 +0800 From: Cao jin To: , CC: , Subject: [PATCH RFC] kbuild: fixes in Makefile.lib Date: Fri, 10 Nov 2017 15:35:04 +0800 Message-ID: <20171110073504.13836-1-caoj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: 11D1548089F5.A943C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP commit cf4f21938e13e ("kbuild: Allow to specify composite modules with modname-m") add modname-m support, but miss to update the corresponding multi-objs-m defination. commit 551559e13af1c ("kbuild: implement modules.order") miss to filter the subdir listed in obj-m. Except that the subdirs are totally identical between obj-y and obj-m, or else I think it will miss something. But until now, no one has complaining about it, so I guess it just no one has triggerred it. Signed-off-by: Cao jin --- I found these 2 points which I think might be wrong during code inspection, but until now, they seems didn't do anything bad, so I am not sure this is a problem:) scripts/Makefile.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 580e605118e4..3209f303213b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -22,7 +22,7 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) # Determine modorder. # Unfortunately, we don't have information about ordering between -y # and -m subdirs. Just put -y's first. -modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko)) +modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y) $(obj-m) $(obj-m:.o=.ko)) # Handle objects in subdirs # --------------------------------------------------------------------------- @@ -49,7 +49,7 @@ single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) # Build list of the parts of our composite objects, our composite # objects depend on those (obviously) multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y))) -multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) +multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) multi-objs := $(multi-objs-y) $(multi-objs-m) # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to