All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] Kconfig: add new special property shell= to test compiler options in Kconfig
@ 2018-02-08 16:19 Masahiro Yamada
  2018-02-08 16:19 ` [RFC PATCH 1/7] kbuild: remove kbuild cache Masahiro Yamada
                   ` (8 more replies)
  0 siblings, 9 replies; 89+ messages in thread
From: Masahiro Yamada @ 2018-02-08 16:19 UTC (permalink / raw)
  To: linux-kbuild, 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,
	Jiri Kosina, Masahiro Yamada, linux-kernel

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

^ permalink raw reply	[flat|nested] 89+ messages in thread

end of thread, other threads:[~2018-02-15 23:38 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 16:19 [RFC PATCH 0/7] Kconfig: add new special property shell= to test compiler options in Kconfig Masahiro Yamada
2018-02-08 16:19 ` [RFC PATCH 1/7] kbuild: remove kbuild cache Masahiro Yamada
2018-02-08 16:19 ` [RFC PATCH 2/7] kconfig: add xrealloc() helper Masahiro Yamada
2018-02-08 16:19 ` [RFC PATCH 3/7] kconfig: remove const qualifier from sym_expand_string_value() Masahiro Yamada
2018-02-08 16:19 ` [RFC PATCH 4/7] kconfig: support new special property shell= Masahiro Yamada
2018-02-09  5:30   ` Ulf Magnusson
2018-02-09  9:19     ` Masahiro Yamada
2018-02-09 12:46       ` Ulf Magnusson
2018-02-09 20:46         ` Kees Cook
2018-02-10  5:48           ` Ulf Magnusson
2018-02-10  7:12             ` Masahiro Yamada
2018-02-10  7:49               ` Ulf Magnusson
2018-02-10  8:05                 ` Ulf Magnusson
2018-02-10  8:55                   ` Ulf Magnusson
2018-02-10  9:21                     ` Ulf Magnusson
2018-02-10 18:05                     ` Randy Dunlap
2018-02-11  2:00                       ` Kevin Easton
2018-02-10 19:23                     ` Kees Cook
2018-02-10 20:08                       ` Linus Torvalds
2018-02-11  4:13                         ` Kees Cook
2018-02-11  4:46                           ` Linus Torvalds
2018-02-11  7:28                             ` Linus Torvalds
2018-02-11 10:34                               ` Ulf Magnusson
2018-02-11 17:56                                 ` Kees Cook
2018-02-11 18:13                                   ` Linus Torvalds
2018-02-11 19:39                                     ` Kees Cook
2018-02-11 19:53                                       ` Linus Torvalds
2018-02-11 20:06                                         ` Linus Torvalds
2018-02-11 21:10                                           ` Arnd Bergmann
2018-02-11 21:19                                             ` Kees Cook
2018-02-11 21:50                                               ` Linus Torvalds
2018-02-12 10:44                                                 ` Arnd Bergmann
2018-02-12 10:44                                                   ` Arnd Bergmann
2018-02-11 22:29                                             ` Geert Uytterhoeven
2018-02-15 23:38                                           ` [RFC PATCH 4/7] kconfig: support new special property shell Palmer Dabbelt
2018-02-11 21:11                                         ` [RFC PATCH 4/7] kconfig: support new special property shell= Kees Cook
2018-02-11 19:42                                     ` Linus Torvalds
2018-02-12  8:26                                     ` Peter Zijlstra
2018-02-12 10:27                                       ` Thomas Gleixner
2018-02-12 11:52                                         ` Peter Zijlstra
2018-02-12 16:19                                       ` David Woodhouse
2018-02-12 16:19                                         ` David Woodhouse
2018-02-12 16:56                                         ` Kees Cook
2018-02-12 17:05                                           ` Peter Zijlstra
2018-02-12 17:33                                             ` Kees Cook
2018-02-12 17:36                                               ` David Woodhouse
2018-02-12 17:36                                                 ` David Woodhouse
2018-02-12 17:37                                                 ` Kees Cook
2018-02-12 17:00                                         ` Peter Zijlstra
2018-02-11 18:34                                   ` Ulf Magnusson
2018-02-11 21:05                                     ` Kees Cook
2018-02-11 21:35                                       ` Ulf Magnusson
2018-02-11 20:29                                   ` Ulf Magnusson
2018-02-11 20:42                                     ` Ulf Magnusson
2018-02-12 12:54                                       ` Ulf Magnusson
2018-02-12 14:21                                         ` Masahiro Yamada
2018-02-12 14:23                                           ` Masahiro Yamada
2018-02-12 14:32                                             ` Ulf Magnusson
2018-02-12 14:29                                           ` Ulf Magnusson
2018-02-12 14:53                                           ` Ulf Magnusson
2018-02-12 15:22                                             ` Masahiro Yamada
2018-02-12 15:35                                               ` Ulf Magnusson
2018-02-11 21:22                                   ` Ulf Magnusson
2018-02-12 14:39                                   ` Masahiro Yamada
2018-02-12 15:24                                     ` Kees Cook
2018-02-12 23:48                                       ` Randy Dunlap
2018-02-13  1:41                                         ` Masahiro Yamada
2018-02-13  1:53                                           ` Randy Dunlap
2018-02-13  8:35                                             ` Arnd Bergmann
2018-02-13  8:59                                               ` Masahiro Yamada
2018-02-12 10:44                                 ` Masahiro Yamada
2018-02-12 11:44                                   ` Ulf Magnusson
2018-02-12 11:49                                     ` Ulf Magnusson
2018-02-12 13:53                                     ` Masahiro Yamada
2018-02-12 14:13                                       ` Ulf Magnusson
2018-02-12 15:46                                   ` Kees Cook
2018-02-12 16:10                                     ` Masahiro Yamada
2018-02-13  8:55                                       ` Ulf Magnusson
2018-02-11 16:54                               ` Kees Cook
2018-02-08 16:19 ` [RFC PATCH 5/7] kconfig: invoke silentoldconfig when compiler is updated Masahiro Yamada
2018-02-08 17:19   ` Masahiro Yamada
2018-02-08 17:45     ` Linus Torvalds
2018-02-08 16:19 ` [RFC PATCH 6/7] kconfig: add basic environments to evaluate C flags in Kconfig Masahiro Yamada
2018-02-08 16:19 ` [RFC PATCH 7/7] Test stackprotector options in Kconfig to kill CC_STACKPROTECTOR_AUTO Masahiro Yamada
2018-02-08 18:30   ` Kees Cook
2018-02-09  4:13     ` Masahiro Yamada
2018-02-08 16:43 ` [RFC PATCH 0/7] Kconfig: add new special property shell= to test compiler options in Kconfig Greg Kroah-Hartman
2018-02-08 17:19 ` Linus Torvalds
2018-02-08 17:39   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.