lkml.org 
[lkml]   [2018]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC PATCH 0/7] Kconfig: add new special property shell= to test compiler options in Kconfig
Date
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

\
 
 \ /
  Last update: 2018-02-08 17:24    [W:0.094 / U:5.116 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site