Received: by 10.223.176.5 with SMTP id f5csp2096957wra; Thu, 8 Feb 2018 08:23:37 -0800 (PST) X-Google-Smtp-Source: AH8x226cUBp4hJBlw6jzaB22T3EZbMgPNi7odjxN9Iw7P4FhEpKrY8vvlbMkwcRq1tbLXef8/bhl X-Received: by 2002:a17:902:aa02:: with SMTP id be2-v6mr1146072plb.121.1518107017361; Thu, 08 Feb 2018 08:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518107017; cv=none; d=google.com; s=arc-20160816; b=X7eaeCWyh/jnqwKPr6qNUMnIEgesalIxLTvXsVp6EGuSk7vVYotTwHhq3Z3nAOLS+z ahZ2ing0lqM3rJb4RkeP2/sdTsUrUg688tx7Ip1Ka+HKnjNiHbECivXu+hxbVBedWiHl 6AIWDn+mxwmOlHxOHP+GOY4y0aiO41XlvkYOUvxGa4aLIJ5LgWO579hTudyShuqB6vPi 3Flrnzyta53ml00yB3tivy5JNoQ/u9rxK5ik//fQ7a9QyUa9teNyQdbX5Aw4rokWgIbY q3zEVJH2SYKkRkYc6RFt+Ad8WJ8WZg7PSSNFz5KAMOHS1CiSo1v64QT+fuL1kBzqHNmX M2mg== 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=/g1y1Iw1M86dfdHAksqnjpCIIERRxDGzTanKycUqsIw=; b=w5YQRvsz7fFyftpqbFsq4DXuO9HjKsV4t7YidWctrjCoU36vQVvJ7//pmV/+HW2tpH m36K9TbS7hn3yPBKHFYffIGBuliXz/5oOM3vrIUUVDubEuMqcT+56EAvmi5i2VqUb8dh MqRtYiUusuucpypGVm9QH3IhBxkTPXtZJDJpxGHAwvr2Df6/3FF7rj8LiH0i/Khv5tSo iqwSAIUvIfe1OmeZ/LnKJP1Gn+mYpYeBj6O5M3ir8ZJIcRIcC+4B5pLtFSHo6nqEKwzi DEr9nwBzIcCo9eLyeF2n1cLma5QRZzMNd1cd+cBZsItHFR5XE+lff6kClC+9pROc9qpu y72Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zcIAyvom; 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 b184si123615pgc.786.2018.02.08.08.23.20; Thu, 08 Feb 2018 08:23: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=zcIAyvom; 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 S1752612AbeBHQWa (ORCPT + 99 others); Thu, 8 Feb 2018 11:22:30 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:19360 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbeBHQVh (ORCPT ); Thu, 8 Feb 2018 11:21:37 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-12.nifty.com with ESMTP id w18GJP1H021191; Fri, 9 Feb 2018 01:19:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w18GJP1H021191 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518106772; bh=/g1y1Iw1M86dfdHAksqnjpCIIERRxDGzTanKycUqsIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zcIAyvompiaZrVI+RLGR8xnP0qT0sVA7c45lqr9Ibmu/tkVnbTKI7KKbDA0ui6dPN kbgVaswX4DIBXO92awYknr1hpyhsE2vUPTHtErygXdVGBmdR+WtNKI2lTANcNPDaR8 eh3CfcJ6GnwLRXTHKytO11YWZcF4DniLehLX1d3etSrcqhfaAo8vkZCl/22TfFkEDE pBH8K+vhOtNnxuISENoGaXLhJFpK1ukaNB0/N/XtWMU+EFwYhA0CflKehi8HaRwMbP 0+4UA8gXD9rP0mPArGtjF6JnfWWmHhtZ1XwV6R0PYeFXt1o9iI7guudKAb3sz66F1q A+3J9LbtEV6JA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, Linus Torvalds Cc: Greg Kroah-Hartman , Andrew Morton , Kees Cook , Nicolas Pitre , "Luis R . Rodriguez" , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Martin Schwidefsky , Pavel Machek , linux-s390@vger.kernel.org, Jiri Kosina , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [RFC PATCH 5/7] kconfig: invoke silentoldconfig when compiler is updated Date: Fri, 9 Feb 2018 01:19:10 +0900 Message-Id: <1518106752-29228-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518106752-29228-1-git-send-email-yamada.masahiro@socionext.com> References: <1518106752-29228-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 Moving compiler option tests to Kconfig means you need to re-run Kconfig when you update your compiler. All CC_HAS_... symbols and other symbols that depend on them must be re-calculated. It will be nice to detect the compiler update and automatically invoke silentoldconfig. This can be done by adding one environment. With this, silentoldconfig will add something like follows into include/config/auto.conf.cmd: ifneq "$(CC_VERSION_TEXT)" "gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609" include/config/auto.conf: FORCE endif CC_VERSION_TEXT contains the first line of "$(CC) --version". If this text is changed, silentoldconfig will be invoked. Signed-off-by: Masahiro Yamada --- Makefile | 2 ++ init/Kconfig | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 2ee49c9..9afd617 100644 --- a/Makefile +++ b/Makefile @@ -441,6 +441,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. diff --git a/init/Kconfig b/init/Kconfig index e37f4b2..64f9dd2 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -16,6 +16,15 @@ config DEFCONFIG_LIST default "$ARCH_DEFCONFIG" default "arch/$ARCH/defconfig" +# CC_VERSION_TEXT is needed here to invoke Kconfig when compiler is updated +config CC_VERSION_TEXT + string + option env="CC_VERSION_TEXT" + help + This is used to detect if the compiler is changed. If the version + text does not match, silentoldconfig will be invoked because we need + to re-compute compiler capabilities and symbols that depends on them. + config CONSTRUCTORS bool depends on !UML -- 2.7.4