Received: by 10.223.185.116 with SMTP id b49csp1046095wrg; Fri, 16 Feb 2018 11:24:57 -0800 (PST) X-Google-Smtp-Source: AH8x226TL88NaR94XWsN5gkLsezcHcbTxcpTFVOzOvbPf54s2UGOmgW8eXgBmH3VZI2kibYL688i X-Received: by 10.98.147.209 with SMTP id r78mr7093337pfk.204.1518809097100; Fri, 16 Feb 2018 11:24:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518809097; cv=none; d=google.com; s=arc-20160816; b=lymulcUtvq08kdsm3rXZe9haq1YEsX4IvC7LA/WvcUbtv0olVEQt0kC1h4qLwa+lOE /p7woLyvaA1wS55B/oYeuWHwid+tZUrGL+LBDttrNlLqLPE+nu74s8VntUOCR3tmrAtr 3KbJ2fEvadupkuY+yS0ep0q/htEQ4EHr0oTIuaNyZAqA1vHd8t12+Um2QzJgbZVsA+E7 KY2CaV5/4ziOVmxsJzHHbyp4qXrPBtSTdjrop2a8YW3t8a6YKul8pxSSGPRC4P6Ey6Ec ikFyR0YXKSJH2yqEe2CJ1r2GJOEsuUIO/TKI6M9PHXgBVfE211f7TcXk4b0sxTUa70fA ehdQ== 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 j186si2416968pgc.175.2018.02.16.11.24.42; Fri, 16 Feb 2018 11:24:57 -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 S1752993AbeBPSod (ORCPT + 99 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(+) 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. -- 2.7.4