From patchwork Thu Sep 13 08:20:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10598843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7583713BF for ; Thu, 13 Sep 2018 08:21:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67ED52A4DD for ; Thu, 13 Sep 2018 08:21:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C5BB2A514; Thu, 13 Sep 2018 08:21:00 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 ADAF52A4DD for ; Thu, 13 Sep 2018 08:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbeIMN3R (ORCPT ); Thu, 13 Sep 2018 09:29:17 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:24653 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726308AbeIMN3R (ORCPT ); Thu, 13 Sep 2018 09:29:17 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w8D8Kjt5029037; Thu, 13 Sep 2018 17:20:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w8D8Kjt5029037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1536826846; bh=DAH2jnP4F1CxRsadjmBKr7a+pDjBBesmYMZ3s8NkMmU=; h=From:To:Cc:Subject:Date:From; b=IUewTcuoxzHJHDrt+3QcPlnmKsoRDaDzGj3EMCXTFkoPTEoB7u5gvkhdFwaPE4LqF tC0MzBP7eYNG74+DM3VjRxmhZYBRLcktSCNCKg+2U9UmS87K0b+CyZN96r1S280fvS DS/igTuYvn/W4FfSWLIxxpiK3DEfnWWrdk3NkPbx6u/UeFldg7pfXToDs62lNYrla/ QfYiM4SOXIX3vWwQAKwBjZjOeZA7FrC8vVaYsGahZfaTu7pQzvHJm8rdVfb7EwrkdT GhUzS/pZpoW8utMCYAOhBRwHIM/J4u/B3B/6JJ7BAWsPA46GFPWXGc3N7ks3hMt6Xt SWlERh7YzXFFA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: remove unneeded link_multi_deps Date: Thu, 13 Sep 2018 17:20:41 +0900 Message-Id: <1536826841-4458-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 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 Since commit c8589d1e9e01 ("kbuild: handle multi-objs dependency appropriately"), $^ really represents all the prerequisite of the composite object being built. Hence, $(filter-out FORCE,$^) contains all the objects to link together, which is much simpler than link_multi_deps calculation. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index cb03774..d7fa203 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -485,28 +485,12 @@ targets += $(obj)/lib-ksyms.o endif -# -# Rule to link composite objects -# -# Composite objects are specified in kbuild makefile as follows: -# -objs := -# or -# -y := -# or -# -m := -# The -m syntax only works if is a module -link_multi_deps = \ -$(filter $(addprefix $(obj)/, \ -$($(subst $(obj)/,,$(@:.o=-objs))) \ -$($(subst $(obj)/,,$(@:.o=-y))) \ -$($(subst $(obj)/,,$(@:.o=-m)))), $^) - quiet_cmd_link_multi-m = LD [M] $@ -cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) +cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter-out FORCE,$^) $(cmd_secanalysis) $(multi-used-m): FORCE $(call if_changed,link_multi-m) - @{ echo $(@:.o=.ko); echo $(link_multi_deps); \ + @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \ $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod) $(call multi_depend, $(multi-used-m), .o, -objs -y -m)