From patchwork Fri Mar 8 05:49:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10844231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 903A614DE for ; Fri, 8 Mar 2019 05:50:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C77E2E05E for ; Fri, 8 Mar 2019 05:50:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70CD62E068; Fri, 8 Mar 2019 05:50:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A3AA2E05E for ; Fri, 8 Mar 2019 05:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726039AbfCHFuq (ORCPT ); Fri, 8 Mar 2019 00:50:46 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:49044 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfCHFuq (ORCPT ); Fri, 8 Mar 2019 00:50:46 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x285nUI8008836; Fri, 8 Mar 2019 14:49:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x285nUI8008836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1552024171; bh=WPaR9mGQS3i/ZN6TFjOnpo4V/zOzzCAsMlMHCSy8VCE=; h=From:To:Cc:Subject:Date:From; b=fPJwF0aE65pNop3N6PFh+ozSJJEeBIXH0wzTvqq2nkXUT15t/CRbFPKKDzGNnsj4R bRzxzF4cCiKkUjRV+s3U7LJoomhjJ6T1BT7byLODIAjXuFZtZTta0AkXQ0ZL9kjRBm oriy1lxxANKhqRZeYdm4gQp7ul8bNnClr0ozHWJsQZF/k82GImNxjbd/Dyf/66GLFZ ROiW/XWWxNqN62bpu0OUD2U7hvI0vZtrVjiNcZkdqNif5dPQ2wocBxIHS5/v8N9M07 SdBKsqSKPAtz4ZnK69eN1ivnY2kYblL8OxRtsDOCYbp00KWR0x2DLNFqmeGyTjpohM lnK5H6ftCqe0g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Nicholas Piggin , Michael Forney , Sam Ravnborg , linux-kernel@vger.kernel.org, Palmer Dabbelt , Nicolas Pitre Subject: [PATCH] kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG} Date: Fri, 8 Mar 2019 14:49:10 +0900 Message-Id: <1552024150-9831-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As commit 423a8155facf ("kbuild: Fix reading of .config in link-vmlinux.sh") addressed, some shells fail to perform '.' if ${KCONFIG_CONFIG} does not contain a slash at all. Instead, we can source include/config/auto.conf, which obviously contain slashes, and we do not expect its file path overridden by a user. Perhaps, the performance might be slightly better since unset CONFIG options are stripped from include/config/auto.conf. scripts/setlocalversion already works this way. Signed-off-by: Masahiro Yamada --- scripts/adjust_autoksyms.sh | 9 +-------- scripts/link-vmlinux.sh | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh index 6e6d639..84bf6b5 100755 --- a/scripts/adjust_autoksyms.sh +++ b/scripts/adjust_autoksyms.sh @@ -39,14 +39,7 @@ case "$KBUILD_VERBOSE" in esac # We need access to CONFIG_ symbols -case "${KCONFIG_CONFIG}" in -*/*) - . "${KCONFIG_CONFIG}" - ;; -*) - # Force using a file from the current directory - . "./${KCONFIG_CONFIG}" -esac +. include/config/auto.conf # Generate a new ksym list file with symbols needed by the current # set of modules. diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index bc7f1fc..dc0e8c5 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -171,14 +171,7 @@ if [ "$1" = "clean" ]; then fi # We need access to CONFIG_ symbols -case "${KCONFIG_CONFIG}" in -*/*) - . "${KCONFIG_CONFIG}" - ;; -*) - # Force using a file from the current directory - . "./${KCONFIG_CONFIG}" -esac +. include/config/auto.conf # Update version info GEN .version