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: 146614 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp323965ljw; Thu, 13 Sep 2018 01:20:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbPi/rGP6t7EhOOPyc/EK9W2eK6KfG4/dUHBi7854piMEa3xp6zCUkHXBAXLvmAN3FZPh8J X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr6184764plo.81.1536826856501; Thu, 13 Sep 2018 01:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536826856; cv=none; d=google.com; s=arc-20160816; b=FRzTvFn7vrfiTUpTzVPS7dPb9U1WFTaIN8cW3UCzVDzr72VbRStByiUzXa733fJkJ9 eRA4f2Sx+VoY3ULtjoe4UF1jzg4AW6yx6H/dqpqwlF3aDZyb4k5LFAs3gfJ7XAKlKYF3 hFf9BxYcqG62wrztIcI4phVwwy7/MZk/sM2upZ3+dthCbkmeI+vPJZIZ9GAAy1XjDmhA aRuh8BRr+Npin3mWlnytX3DtKjT7Slg6o0fR15uXhKmeBnGwIMIgUsk1oNppoA90FSKs XShS4JTJvE2L1Voudt2ii6tBipYqHtk4A1fdYLbYVC4/htMspXLW7OYHS+SRV2Nu5vLW 2UNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=DAH2jnP4F1CxRsadjmBKr7a+pDjBBesmYMZ3s8NkMmU=; b=KEPUZf5MkSX678JdCFE6WCzFJSAfl1LEAFn21cPYeV1plIZ7i1a7zwmQV3BqUAeN7q 8Mdl1leSnSWv8g7/uiSqi1mytUIS5BLZc0nhXy6BSaxTt/KGclrZ3L0h9XWLmU2BVj9r GepdHGTC1of9ZO/76Hsi6oVpM8RQ4Az0JVMH/z+ZbhsO+IdS+MRfGOUgxPV1CxqZpzYD amwBMVuTUjRhTMbWRLJA71LzC8iuegjLVlepeUdXcE14Ock71a1msGixUb8p/yNeELem K44jPzfG37AXN6J3Pc6od8EKhqE9L0m4JBbbwxjzN4orH1dCkoRGxw+2Rd2godnbQ1hL utSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IUewTcuo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9-v6si3301803plt.478.2018.09.13.01.20.56; Thu, 13 Sep 2018 01:20:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IUewTcuo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbeIMN3R (ORCPT + 32 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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)