From patchwork Thu Oct 3 10:29:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 175071 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp108876ill; Thu, 3 Oct 2019 03:30:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEKbqE+kusK3djhK37JBGMS4GjDxsFEMwiKutK4E5LafhflCineaFwpJBQVSGIBKVt+zMW X-Received: by 2002:a17:906:a2c9:: with SMTP id by9mr6912857ejb.29.1570098605937; Thu, 03 Oct 2019 03:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570098605; cv=none; d=google.com; s=arc-20160816; b=YCUM+nGisrVSTdAVPDmqarCRKtfwhmFmEfWx4rWG5Z56ifiJJ6IN45xpTsw9fucjxT PV/rwLSJ7DTHXcncbLcRMx4bN+NrsPx9WHLVyPT0ptFFOYwpOzOedN2hYyo3A2q6HqXX xRMUSNwqr1FEk+3cMpbsII0YS2M+W//L36rPsoBLNDoYaNBnTSj4Bh2/NfmO49JHHGCJ Dc7Gu/+L169nakYsgI2sU7amWH5AGbSIoGeBjWnyWBb4I2hyGbMBOUeC2aR0kHxmtsEF OZoFKVb5Ea42aD+sweZXgMBEkxR+qb2KQKnwqXMuMT9D5vT5p5KEy4NlGSGMZhhLfYZk G4tQ== 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 o17si956261ejm.261.2019.10.03.03.30.05; Thu, 03 Oct 2019 03:30:05 -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 S1728955AbfJCKaE (ORCPT + 27 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(-) -- 2.17.1 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)))