Received: by 10.223.176.5 with SMTP id f5csp2099026wra; Thu, 8 Feb 2018 08:25:37 -0800 (PST) X-Google-Smtp-Source: AH8x225WARabyOpVpydc8OJC4vRyZHgNzwSRU9iGg1UtoSE3kxYjmZapduvnBmj91FdHJVxTsQ8u X-Received: by 2002:a17:902:6908:: with SMTP id j8-v6mr1116011plk.211.1518107136929; Thu, 08 Feb 2018 08:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518107136; cv=none; d=google.com; s=arc-20160816; b=vvvhSOfFNLOAarHRrx+om39vPToZbo38MDoIsnky1UA445A4KCFRSIoD08sGKM5T8m aS4vFUnFsXHEh8z8ddj7TO5qz58rhCPgNxs2GVTMo+61TZoLlICGokqMFdJOJckAz7Iz WXop+rQHBAk0JZr7DVQ0ffmtG2JYMZ14I+xoZ6aNYmqOvxyCdIV4ja9eTZp5Gs3Vd/2f t8L3VQuzdHZNSyF6M01L02ckoLpOttELtdcgcK4UaoZu8GgQIh/gE8TiUU5NzgO1fquT aQ/R6MfzMwsl34WYdQe935aK6mbbr7lf4pDvDoK1ePktWlDEbzAEs72mNV7glmk2tz1k Ku6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=YzitirJ/Q8VjI4HXMIX0Plvx4w1aL52mZmd+kxZQD80=; b=sgsnyCok6sP5MxIxcHSPOo+SyRJJa+k7rNFT5g7FSEuRkK6S6n0lkb+1GXaaJlRpTG dlJxau8ebctEW9RtJEYgTAizJJi3tO8FxrEIsDNIFmCPbQxXi+FTXQhrBrylfgAuI4d/ T25GsDguZMMArAhbmBlm36pGUgAfMzkBBubHHvJ2SNgAufp0S1N3+G0a4yoBF9WMGVmA UPy165XLUWpsFmbmqdwZXWj9FgP1mtpJa/fMEbtPx+OhnjjHrGYOZe7KFTQ7Om42s2ms 6+P2SgGibp/BkFvngi3Wv1ae7KnUzQqTxxmfnl66qAZBAQE+banHJ7XJCIgAd1Nce/m8 wSvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=GE/4Nbyw; 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 p123si142857pga.143.2018.02.08.08.25.21; Thu, 08 Feb 2018 08:25:36 -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=GE/4Nbyw; 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 S1752274AbeBHQYG (ORCPT + 99 others); Thu, 8 Feb 2018 11:24:06 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:19346 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbeBHQVg (ORCPT ); Thu, 8 Feb 2018 11:21:36 -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 w18GJP1C021191; Fri, 9 Feb 2018 01:19:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w18GJP1C021191 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518106766; bh=YzitirJ/Q8VjI4HXMIX0Plvx4w1aL52mZmd+kxZQD80=; h=From:To:Cc:Subject:Date:From; b=GE/4NbywIIjfNi6Za3vtnuQfTnH0ZPEaJ3EkxEt2fY7+cWhjDLXISq+AZesb+MYKK WnZ9tSR3FNQfwZDeLcIfMaSAGMLkCnauTYRwSMSSnC2ycHGjHOpldLhpYfFjKT1BY8 MT42tv+jT+iwIwy6PWgQP3vnlGqHiOZpvy3p3lcu+CTL7QWDiSUQNa4jyKM7KMT5wu Tav06TYBdXOMDH2pe1QPkMsUJSO8avqDi7maaDacZazezbWPK2rDmw5eI6o9+JLeSQ 3kpBS+vyn+GdQU03DVTXMU68CcjTtG1kMUb2H87wLxfi2mzOJNWUPgaLi/jeZk66pt rHq8yJ4h3EQ2w== 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 0/7] Kconfig: add new special property shell= to test compiler options in Kconfig Date: Fri, 9 Feb 2018 01:19:05 +0900 Message-Id: <1518106752-29228-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This was prompted by the email from Linus today's morning. I implmented this in a rush today, so there are still many TODOs, but I put it here to start discussion. I think it is working, but as you notice, it is tedious to repeat something like follows: config CC_HAS_STACKPROTECTOR bool option shell="$CC -Werror -fstack-protector -c -x c /dev/null" One possiblity is to put this ugly code into script like follows, config CC_STACKPROTECTOR bool option shell="$srctree/scripts/cc-option.sh $CC -fstack-protector" ... but this is longer. I was thinking of something like follows: config CC_STACKPROTECTOR bool option shell="$(CC_OPTION -fstack-protector)" Need time to brush up details. Comments are appreciated. Masahiro Yamada (7): kbuild: remove kbuild cache kconfig: add xrealloc() helper kconfig: remove const qualifier from sym_expand_string_value() kconfig: support new special property shell= kconfig: invoke silentoldconfig when compiler is updated kconfig: add basic environments to evaluate C flags in Kconfig Test stackprotector options in Kconfig to kill CC_STACKPROTECTOR_AUTO Makefile | 65 +++++++--------------------- arch/Kconfig | 54 +++++++++++++---------- init/Kconfig | 17 ++++++++ scripts/Kbuild.include | 101 ++++++-------------------------------------- scripts/kconfig/confdata.c | 2 +- scripts/kconfig/expr.h | 1 + scripts/kconfig/kconf_id.c | 1 + scripts/kconfig/lkc.h | 2 + scripts/kconfig/lkc_proto.h | 2 +- scripts/kconfig/menu.c | 3 ++ scripts/kconfig/nconf.gui.c | 2 +- scripts/kconfig/symbol.c | 78 +++++++++++++++++++++++++++++++++- scripts/kconfig/util.c | 15 +++++-- scripts/kconfig/zconf.l | 2 +- 14 files changed, 176 insertions(+), 169 deletions(-) -- 2.7.4