Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 423ba0fe authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Greg Hackmann
Browse files

BACKPORT: 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: default avatarArnd Bergmann <arnd@arndb.de>
Suggested-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarMichal Marek <mmarek@suse.com>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
(cherry picked from commit 9f3f1fd299768782465cb32cdf0dd4528d11f26b)
Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>

Conflicts:
	scripts/Kbuild.include

Change-Id: I4c8288b9c74bd6b9199307a0e04b78a27e28361d
parent 3afdf761
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment