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: NArnd Bergmann <arnd@arndb.de> Suggested-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NMatthias Kaehlcke <mka@chromium.org> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMichal Marek <mmarek@suse.com> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
Showing
想要评论请 注册 或 登录