Received: by 10.213.65.68 with SMTP id h4csp310740imn; Mon, 26 Mar 2018 22:37:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELv/JI6OEt8aJMBujNnhbNQEf7JVq/Z/XvgQUVry9+4tvf9pZ05ZkLJMeiCPBh2gwkIft9zd X-Received: by 10.98.86.16 with SMTP id k16mr12828432pfb.149.1522129035403; Mon, 26 Mar 2018 22:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522129035; cv=none; d=google.com; s=arc-20160816; b=tYsYvN90V5xT9yZQYOmi8tLiexmahKndXMK0ZDjEupaB54nX/zBwM8D1Me6bteayTF zE8nrhlz+Rfaa/o4hPiY9eWAG7iPfmMTOK25/quaHK3KhKabjtHUc5Pl2Uh5EwU4YbZh 5BoRVSS9LO43pw1M7H3nVYJFQMyiRROxTVSKYKE8cT4vjEZ96xlRrwgJZH3eXDsfGerH PgEfcVQrJ5zX1pbMGURTY9bFs+3krXn+qnYcUCLQkZ421l9NRnQuece34FhLQRny3tA2 4jqPopBbxGmPiq6MinTxvMqpDKy01hczNCy+pnc/T/SQZFhqoJqONstP1vAzCLgVEmFl UOEg== 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=Y0EgiF5xffNcee7N9S9KbbQwPIhX8Hv7iF7h8moPLZY=; b=lt6Y9nirS35eBSonZQKCABM7HmZsuIcrskkpSK3UxVb4J7csfEvItBhobEz7r2jWf5 jsM7BU+M3KshEkYVt8aVkql5v0yPJ71lEsyRSPHsSNsYq8Yd8YVQvMNfwsLbDml72vLH RAX9PgZqyW03tDvhR+L7YjMQMmzLdBJU2nx4lzE/txkQ5XgZo0sQUGBj6Vk4KMHqTiVJ b6TwcBj5SlKtTrCdKRYzlRMUteVP1f3wFfxkNjwEzymJYF3gFKqdNCmmrtyeJuAMBbLE OVx73f7YYXNvF1VBf08EyFXDwqiL+Je3ioaZABKgjcj0fi/YzJ8Bca5OKQByr9DtlRUx vJBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=BUh/7azb; 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 o61-v6si495165pld.646.2018.03.26.22.37.01; Mon, 26 Mar 2018 22:37:15 -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=BUh/7azb; 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 S1750918AbeC0FcE (ORCPT + 99 others); Tue, 27 Mar 2018 01:32:04 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:44599 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751805AbeC0FcA (ORCPT ); Tue, 27 Mar 2018 01:32:00 -0400 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 w2R5TaLv011947; Tue, 27 Mar 2018 14:29:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w2R5TaLv011947 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1522128593; bh=Y0EgiF5xffNcee7N9S9KbbQwPIhX8Hv7iF7h8moPLZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BUh/7azbvSXym3RK9hyEVvCdE8sCN/fMp3SmWIjgXDsb5NIaOhhLaPlLXHk30mASd HrUJC6qR2uKJyco45ptBmMMBtn0poki2kuG/CzFsdjWU/9Jj7TYwCpet8xwhgHYkTC 58ITtQLOUf5bnY1gYsWXZVKpTADUH90vsNkVj7eI5DuVCWGRwNwQrb2bskJqTeqOga hneYruvR+smdoMDkEu47q9nsR6XrjsGLMKPKpJDJNAW0sG0ltlRRvpBKwrVzLZKN2+ QHr3fUJP/tT9HfUE5ujCCEbbRhHm2yiEFxQ4ND9VBrOwkHN/loelKedysKT1cra32R 2kecjWp3G2UMw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Linus Torvalds , Arnd Bergmann , Ulf Magnusson , Kees Cook , Thomas Gleixner , Greg Kroah-Hartman , Randy Dunlap , "Luis R . Rodriguez" , Nicolas Pitre , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 12/21] kconfig: show compiler version text in the top comment Date: Tue, 27 Mar 2018 14:29:26 +0900 Message-Id: <1522128575-5326-13-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522128575-5326-1-git-send-email-yamada.masahiro@socionext.com> References: <1522128575-5326-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 compiler 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 syncconfig, 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 --- Changes in v2: None 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 5cadffa..3dc9eb8 100644 --- a/Makefile +++ b/Makefile @@ -450,6 +450,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