From patchwork Thu Feb 8 16:19:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 127683 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1643245ljc; Thu, 8 Feb 2018 08:24:11 -0800 (PST) X-Google-Smtp-Source: AH8x227ApoGhabCeV/xDIIaazi0QyiVpBL+gKVlNYNrRXRSndN5DrBcslYqZ9BhZ/PCI0x0ARmaB X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr1114297plt.368.1518107051068; Thu, 08 Feb 2018 08:24:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518107051; cv=none; d=google.com; s=arc-20160816; b=EwTW+fxH40vykh903iTMoLcOekW6cNSZOTL3Wa1n4t6UZkET5Ip1clWPYr4GNZ2qtF nIS532msB43b5YKbwV0aBuipsGCvDgtnuFEfBKNAziJpw58ni+eW6vEXS+B6evNe3Jg1 up0mELU2l0Su3V/Vs/aVpctyGVGKIBBqxetPkCkq7tvehq52QUzrKhUEAlDtcLTYk2Fa wwffD+326k7UDoEJtfZ1AH17itg5+ZGZPyNM+SLCCFdn9+jLQTjQ4QF95WgAqxebv8jw j+i8OwpQWk5mpbauwGuHu8cbDxmaJ7GxIcqUnAr8iwgK3VBz+ZLdFQgtnyIbChZcIjg9 I0Lw== 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 10si186255pfu.318.2018.02.08.08.24.10; Thu, 08 Feb 2018 08:24:11 -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 S1752380AbeBHQYG (ORCPT + 13 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