From patchwork Fri Aug 2 10:23:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 170425 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp623236ile; Fri, 2 Aug 2019 03:24:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw96JyRE8uH3MITsVr65uO3W/4+3u32AlYdp8rUjNvuhBYpzsAT/H0McYDcAgL57m1u2X4Z X-Received: by 2002:a63:6c46:: with SMTP id h67mr115976853pgc.248.1564741488732; Fri, 02 Aug 2019 03:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564741488; cv=none; d=google.com; s=arc-20160816; b=Xbw0AzVVZEYgmrt7SRqH/29say8REOPjK34lKO2isnS5xgvQWn5A/vYJliE6DNY4mu wDELpTjm71wdN6kQtOCvYmOMVtjgMV5rSD47F59BNXmpkxnrXFt50VHupktLQXi+o9ky +JN0q9Yi3iCt7DXrq5mcky8T9/c367b7tv9Y3ZQTvwK+CMi6eIQ+1sE9LpgiT+JDnkV7 JktJlmKnaC2G9cSmh2upvHBjvU9WN9HCrQ6/PwnWBMWG7IWdF0CohmT2bc7sAqJ7c6o5 bsDck1AJpSqAmA4VyXmAS4trlJfrc/yC9F64TMmEVKLwvAinkBSW05Ly8Kl6pcCGFqi/ LPWQ== 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=n/3z6sxaqwSze/Hh8Zph16qQQC76psZH8+GynZc23WU=; b=v/F3yiKChScas/7hOhC95hhz36mpVY7GK8U7HDjBJifO6zbq8jE+czUeDhjtJQXB+z BHosHyQuVzY5Lfj1eZMPH+ypiqGKuoGlD9dDn29F9G/0Hd6IntCrfcMQERSC6dnSHk3+ MetNvSZ/pQqVccLo9q/heGCCQiIViQEEvbXO4RPeV8Xf2+Ld5AY1QHl61Xq7NtSDhKLH zGtOmuXgxQkhC976RxV+CQPkKwjpmZiZKU526CEW5ZF1YBX8RwtwHdUcYzGaL3HVP8U6 /UeQdjwdtolmEJ+zodxsvVuFcjJfZgEhgCTE8shxprtK5obGG45905nSk4Q5U5NA76jS PT5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tGiZVQqG; 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 s24si39133446pgq.372.2019.08.02.03.24.48; Fri, 02 Aug 2019 03:24:48 -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=tGiZVQqG; 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 S2391349AbfHBKYn (ORCPT + 29 others); Fri, 2 Aug 2019 06:24:43 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:16789 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731757AbfHBKYn (ORCPT ); Fri, 2 Aug 2019 06:24:43 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x72AO3Rx020587; Fri, 2 Aug 2019 19:24:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x72AO3Rx020587 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1564741444; bh=n/3z6sxaqwSze/Hh8Zph16qQQC76psZH8+GynZc23WU=; h=From:To:Cc:Subject:Date:From; b=tGiZVQqGT7EqYbksnJJ0djQ5kZhKsAl/+vab7Wy8U+yKjVTrRKoHaDI+QP9sq5OYa jermtuapMlHk1J6BG8rwxv2QXg127jtU8atuvbbB+8PLq56Zi6Lo11vN4xiUlMiz58 0BIi4Ko7jIkHz/nGl0UUd8kEMjj1pQivGz5wgufwxqmF2ogYB1Ir2qfTTdtYI0rlnn 9R7ZZC16GSllBQWoeVaNDR32oj4c0aniNu0viO+JFxr9HunUsH7LYocSzQVbT4s4vB AeCRdlgDh7j1EBp30qtMksy2E1Aoy11WAJQazcet0kjn1W7cK69FY8Pqp9+5SUTLKM FT+z6Pbgw/5AA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Don Brace , Arend Van Spriel , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: revive single target %.ko Date: Fri, 2 Aug 2019 19:23:58 +0900 Message-Id: <20190802102358.28408-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I removed the single target %.ko in commit ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod") because the modpost stage does not work reliably. For instance, the module dependency, modversion, etc. do not work if we lack symbol information from the other modules. Yet, some people still want to build only one module in their interest, and it may be still useful if it is used within those limitations. Fixes: ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod") Reported-by: Don Brace Reported-by: Arend Van Spriel Signed-off-by: Masahiro Yamada --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/Makefile b/Makefile index 571cf862d7a4..e4c7211f5a3b 100644 --- a/Makefile +++ b/Makefile @@ -997,6 +997,8 @@ endif PHONY += prepare0 +export MODORDER := $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)modules.order + ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ @@ -1766,6 +1768,10 @@ build-dir = $(patsubst %/,%,$(dir $(build-target))) $(Q)$(MAKE) $(build)=$(build-dir) $(build-target) %.symtypes: prepare FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(build-target) +%.ko: prepare FORCE + $(Q)$(MAKE) $(build)=$(build-dir) $(build-target:.ko=.mod) + $(Q)echo $(build-target) > $(MODORDER) + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost || { rm -f $(MODORDER); false; } # Modules PHONY += /