Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4601958ybh; Tue, 6 Aug 2019 14:40:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnyXrH5K5C3rkeOqwxClF6GUTGWsBS0Q8qqilh1QwOQKFylb+NCBRMDA69TQN2cZbVGpR6 X-Received: by 2002:a17:902:788f:: with SMTP id q15mr5194900pll.236.1565127604665; Tue, 06 Aug 2019 14:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565127604; cv=none; d=google.com; s=arc-20160816; b=X54YzcK1yyTNcMWosUkUvfqywbf+TF0m+Gp7YwP2WfQR+aw8laFcLKgXkbJUnycxgz sUAwgvgyPrXjDj3exrdKhCSwKYWLe6wvBC6RRa9jBtWyUp8SB/7dYADsLXx3lCFOXbRs mlfSnWJfj0UhrVo73JBUeflNlT244qOTQivkowq6TgphQBJfOvcXQ9lBRUR62bOy+n6T 4HVXZr5DHFTGClYql79sRuqqv34AW/RYSQAfJsR1F9xaNP08qlaGXHgsjHveIDMK+SC5 YtrwiUkS0iU5ZQNqI28fs9nMqRYU6fU2ORQKuXZHiF73vgNJwajUfDif+UnK7oVhkm6k UG+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dSqzJ4RNqiOaiOd2pg7kgDFB8ahoOnsPZkgo0vMJEf8=; b=VXXpymmSpO3I0locxccKwoOMAUNfCMKDAl0p4hTaRhYYCSFmb7Lz6tffYRLm4zzc29 Zz2SlhJnhS8fol/65HRf/RpKAkJl4MCpgkKipRdHeGQSMa8DpdeajcRUgdfH9EHoPFnP Tm7liVBWup92p4BPmV0edUir7/FL6KNRit8oyndWxpLkn5m64lqpHdN5RQnZzIMk+HXK 6xKkE9vUfBO66QCI9hDcQU7BJK9T1ZGHpP3PI0PaXBsEMP0Upv++5n+DJsVkU/uxKHIr lOgfZoK5b1HI7xj5xuwPJad/sF846oabdJEJ9qpVfna86B/L1a3wkfl9rgBtWgjbFwrx sl8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aFj+RKc5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si16056336pjb.84.2019.08.06.14.39.49; Tue, 06 Aug 2019 14:40:04 -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=@kernel.org header.s=default header.b=aFj+RKc5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728960AbfHFVif (ORCPT + 99 others); Tue, 6 Aug 2019 17:38:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:55806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729636AbfHFViI (ORCPT ); Tue, 6 Aug 2019 17:38:08 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE9CF2189D; Tue, 6 Aug 2019 21:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565127487; bh=kZNJw0eCXlGn7+HslIMV99ipbELnDDDiwrkO3ZxK5Aw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aFj+RKc5IA2jEbvGbxSpYBXVPKotqPrapTwQpDUz8vzWYgmb8euASD2v7pxSKWapr 0GNkES8BWowyASymDj4SS9+ziLMoDJHy3jRPFeP4dO+6yEVMa/90xnr38kihZFyfZv cU36iNChqX/eWRFoOhWvuOvXAprVrJb5oYfNtKro= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Masahiro Yamada , Sasha Levin , linux-kbuild@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 10/14] kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules Date: Tue, 6 Aug 2019 17:37:44 -0400 Message-Id: <20190806213749.20689-10-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190806213749.20689-1-sashal@kernel.org> References: <20190806213749.20689-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit cb4819934a7f9b87876f11ed05b8624c0114551b ] KBUILD_EXTRA_SYMBOLS makes sense only when building external modules. Moreover, the modpost sets 'external_module' if the -e option is given. I replaced $(patsubst %, -e %,...) with simpler $(addprefix -e,...) while I was here. Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/Makefile.modpost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 1366a94b6c395..7718a64b1cd15 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -74,7 +74,7 @@ modpost = scripts/mod/modpost \ $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ - $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ + $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ -- 2.20.1