Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp177831ybn; Thu, 3 Oct 2019 03:30:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzamWaJTu6gEFxBi9KwOBGI8XHCc4XSKb/4M1BtSW9PKRHgWWfCcsiajDxmdmtDRyXqNtLv X-Received: by 2002:a17:906:1a08:: with SMTP id i8mr7110729ejf.231.1570098645526; Thu, 03 Oct 2019 03:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570098645; cv=none; d=google.com; s=arc-20160816; b=kZazhBQj/UktS0OSXN8boLYIpxRG00Hblk2lSfv+fNgENnk3i4oy2EAjJxDPtjEBgQ I4EoX0dQND+k8gg5B7orJ3qstZXUlSdN59EbMj4iBM98WV60tQUBKDzykm14lznjCvr8 7bWe8VAcfFtecZC9+xYCv2QOTKNajjBv9bgoID44Bhe/PZc9yDwQDwbyIkdLCl2K1G/u 9+iOj2KVdLzCVUBxqmUl8Jt/rTu+senHIXitYgJmx8E+Kv0EZ7bA6NNFRsBA/zyU+srA miRsRwLTikVFeSehb0Lg7OoF9yKO9Dsxxy8gjJd2nXV/XQfNpKvMgH0jCCYzh4AliYkC tQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=kZnR29A01CLRY6YuzVibGJ8V77kkHRFaE8m/+CQ4ZTk=; b=gkUlZY/B1HvrNmLY4XdiCFQVD9cnhwKaM4Fwli+XvdoCsLzSCtNJJPq1H5rc7kjfkW D4/cDqAjgErqLfMEP/JQvB7Hs2M6a6ntd4NFL1hx8MfV8cDNb7mDuPqs8oXte+hIryo2 otIscvv0s6xVYLG2kFM3jKMWKEQpSP6aSYOnL+49VYENtPoKHdb/2UzEunQ5CdeRmtFB vP4DJam6TFqhJpWwO2gF1cI+TEsUBmWmJzO1+i7qRtceqsJGBomGyX6yjc8ZG7bO3b+a DBUFMI8TnBzP/4nw1qTFNkGY0bEx7xFlDBaOnMLzMwbtmUVQZoQOKFmZ7eUzGN2/WEcj 5zCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=SXDG6Dv4; 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 o12si1180332edc.279.2019.10.03.03.30.21; Thu, 03 Oct 2019 03:30:45 -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=SXDG6Dv4; 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 S1728842AbfJCKaE (ORCPT + 99 others); Thu, 3 Oct 2019 06:30:04 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:49078 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfJCKaB (ORCPT ); Thu, 3 Oct 2019 06:30:01 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id x93ATIYv014338; Thu, 3 Oct 2019 19:29:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x93ATIYv014338 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570098560; bh=kZnR29A01CLRY6YuzVibGJ8V77kkHRFaE8m/+CQ4ZTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SXDG6Dv44hCsS46cxrD2S2SKZlWCtlieKaq3f0eDh+o/a+geZJH2eh7MB2/2aVIWn UKxdsz9rmKjs5EAdCquwLC2eYxQEaTXJ6gFNah021tj6EGmcyjSiZRjUYYcQDCkT50 AuzlIoRR80caoeOpU2FLFxl21sWrTARnUFTtbEXCNGz2ukJsyrURoaBf+kpTfiTSrF CoW/H6AOjBZaAOs8Rmqs4QLN42iW7FE8ZU1n6Z6iGqmckaDLZ3mCPzj6vWZlcq+VYk efhf4+rJj/AQENDwxgaqMlIuC4R1gU3lXh8au+sU59aK9urF9hexKjYE5vyfc4LS6n wziuxA8b3fSMw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] modpost: do not parse vmlinux for external module builds Date: Thu, 3 Oct 2019 19:29:13 +0900 Message-Id: <20191003102915.28301-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191003102915.28301-1-yamada.masahiro@socionext.com> References: <20191003102915.28301-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building external modules, $(objtree)/Module.symvers is scanned for symbol information of vmlinux and in-tree modules. Additionally, vmlinux is parsed if it exists in $(objtree)/. This is totally redundant since all the necessary information is contained in $(objtree)/Module.symvers. Do not parse vmlinux at all for external module builds. This makes sense because vmlinux is deleted by 'make clean'. 'make clean' leaves all the build artifacts for building external modules. vmlinux is unneeded for that. Signed-off-by: Masahiro Yamada --- scripts/Makefile.modpost | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 952fff485546..72109d201196 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -67,8 +67,12 @@ __modpost: else +MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - + +ifeq ($(KBUILD_EXTMOD),) +MODPOST += $(wildcard vmlinux) +else # When building external modules load the Kbuild file to retrieve EXTRA_SYMBOLS info -ifneq ($(KBUILD_EXTMOD),) # set src + obj - they may be used when building the .mod.c file obj := $(KBUILD_EXTMOD) @@ -79,8 +83,6 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) endif -MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - $(wildcard vmlinux) - # find all modules listed in modules.order modules := $(sort $(shell cat $(MODORDER))) -- 2.17.1