From patchwork Fri Feb 16 18:38:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 128616 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp866694ljc; Fri, 16 Feb 2018 10:44:37 -0800 (PST) X-Google-Smtp-Source: AH8x226iQjVuq0Ut8tj0n+gVyK54zkM7aApdyknEFO6b0TIF+bqPGsctXAxHomVmntRUZwQItqXX X-Received: by 2002:a17:902:365:: with SMTP id 92-v6mr6729536pld.127.1518806677237; Fri, 16 Feb 2018 10:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518806677; cv=none; d=google.com; s=arc-20160816; b=DzbS0cZEuIk/eeZdPm3C0eK6YBgD6Xvvo4cJtRFzMDFUfpPHAracuUrgCqSIUvH9AT Nql0xXs0acBukvWfpR1FfnONghg6aj9lcXJPWcabsXW5jOh1errP1mFEEzSYhxV4WvZc D8I2LoSCpKRCo015GFPaUGgwK+3MsnXzQH2TkkZILhfh3OQRUVVTKKIG6UCekYZ5k4zF kJvfAx/Vvk2P4VCbZcK8FBTYc7woUKYugEiR8B4cQH7RM9plXrTgVlNlC3AO0kD7YJCj w0KvV4Sqb+MhbAUbsE6FHRs+6wWd1se1fmzD4M15MGkrRBFrDLNM+U02XWNHAM4Jn/tl uv9A== 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 :arc-authentication-results; bh=EiehZoLPDaIFPIKHmPipZDDhu3qP0WJWAhF2I/M1qZI=; b=N5yxiJIIx7GJqGY9zDIUeLE6UlyW0smMMKuqgtGrR2TNDEbZ0BVuOC3FMhfvEOGbSq 7WukeWNWbrWMXdPfzlotUu1O0oQKjYpbzdx4U//SpuDq9F7nLQqgJHTD0hHNWppd5PNo LJgUMyDXQ90uYUVpeY/FeHDUttu0DOqMlBFYi5akdTaw0eUFG4Ck9jksVmtGf/jVh08g 5nlEpm3irn8H9PqsqMwXJRCbiX8FW9F6qrNC01dFGXH2BDOgJK+K4ijGB1jWjLHULSLB 6OBWPYZ9yl+/9BJEFD7dCOJlEB4ZIkd9ddWB58vTlusveYTedr70kxd3RVeHJQXpT+O+ ikOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=juhLG5ru; 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 k20-v6si3577959pll.606.2018.02.16.10.44.36; Fri, 16 Feb 2018 10:44:37 -0800 (PST) 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=juhLG5ru; 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 S1753096AbeBPSod (ORCPT + 28 others); Fri, 16 Feb 2018 13:44:33 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:58323 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752921AbeBPSlr (ORCPT ); Fri, 16 Feb 2018 13:41:47 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id w1GIdBTH013418; Sat, 17 Feb 2018 03:39:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w1GIdBTH013418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518806366; bh=EiehZoLPDaIFPIKHmPipZDDhu3qP0WJWAhF2I/M1qZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=juhLG5ru4zGFLcuTiNnOPbRAF6RCbpFcGoZykom96Y5XvnIzbxoaWrJDoUXg0MCyo 8SKu6kM8h3XjEZsXUTzes+X7FL/ToLcqQy5h1mBHYPfYpP7tulx7wJWMJVmDKepxeT egtrpTfI3tH7K4Hv7CdCll3ndHSYKMOZtWykqilFs56vIXN7tG7gHnZ+pRa5ltxuqi ISkc8C7YhlWrEiu9PY32NgDOpOCvLpMnZXGEAF/AiaQnxCasS5AY5S+vzzDS49E/GV RXAQfgdGEEq62hw6BmZXil8YvmfENQ/WYxvbBdxjgBIgEvH0V3EEhIpx6hk19rkrJk 0kWka76UerI+Q== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, Linus Torvalds Cc: Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 14/23] kconfig: show compiler version text in the top comment Date: Sat, 17 Feb 2018 03:38:42 +0900 Message-Id: <1518806331-7101-15-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kernel configuration phase is now tightly coupled with the compiler in use. It will be nice to show the compiler information in Kconfig. The compiler information will be displayed like this: $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- config scripts/kconfig/conf --oldaskconfig Kconfig * * Linux/arm64 4.16.0-rc1 Kernel Configuration * * * Compiler: aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011 * * * General setup * Compile also drivers which will not load (COMPILE_TEST) [N/y/?] If you use GUI methods such as menuconfig, it will be displayed in the top menu. This is simply implemented by using 'comment'. So, it will be saved into the .config file as well. This commit has a very important meaning. If the compile is upgraded, Kconfig must be re-run since different compilers have different sets of supported options. All referenced environments are written to include/config/auto.conf.cmd so that any environment change triggers silentoldconfig, and prompt the user to input new values if needed. With this commit, something like follows will be added to include/config/auto.conf.cmd ifneq "$(CC_VERSION_TEXT)" "aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011" include/config/auto.conf: FORCE endif Signed-off-by: Masahiro Yamada --- Kconfig | 2 ++ Makefile | 2 ++ 2 files changed, 4 insertions(+) -- 2.7.4 diff --git a/Kconfig b/Kconfig index e6ece5b..99ed4b8 100644 --- a/Kconfig +++ b/Kconfig @@ -5,4 +5,6 @@ # mainmenu "Linux/$ARCH $KERNELVERSION Kernel Configuration" +comment "Compiler: $CC_VERSION_TEXT" + source "arch/$SRCARCH/Kconfig" diff --git a/Makefile b/Makefile index 6491404..b8df04b 100644 --- a/Makefile +++ b/Makefile @@ -438,6 +438,8 @@ export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL export KBUILD_ARFLAGS +export CC_VERSION_TEXT := $(shell $(CC) --version | head -n 1) + # When compiling out-of-tree modules, put MODVERDIR in the module # tree rather than in the kernel tree. The kernel tree might # even be read-only.