]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: Add __cc-option macro
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 21 Jun 2017 23:28:03 +0000 (16:28 -0700)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 25 Jun 2017 03:47:55 +0000 (12:47 +0900)
commit24323fbe8321adc9558fcf503f3de16fff22eb96
tree844070b5fac455e1bad324587a3d02c55f9fdbcc
parent6d0f193f17f4fd3730780f39bbc4a939f441f2f1
kbuild: Add __cc-option macro

cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines
whether an option is supported or not. This is fine for options used to
build the kernel itself, however some components like the x86 boot code
use a different set of flags.

Add the new macro __cc-option which is a more generic version of
cc-option with additional parameters. One parameter is the compiler
with which the check should be performed, the other the compiler options
to be used instead KBUILD_C*FLAGS.

Refactor cc-option and hostcc-option to use __cc-option and move
hostcc-option to scripts/Kbuild.include.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile
scripts/Kbuild.include
scripts/Makefile.host