summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-06-21 16:28:03 -0700
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-06-25 12:47:55 +0900
commit9f3f1fd299768782465cb32cdf0dd4528d11f26b (patch)
tree844070b5fac455e1bad324587a3d02c55f9fdbcc /Makefile
parent39a33ff80a259b2bddebb236549baee55f9b4f41 (diff)
downloadlinux-9f3f1fd299768782465cb32cdf0dd4528d11f26b.tar.bz2
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 58d7f9cc73ca..4d50f0546637 100644
--- a/Makefile
+++ b/Makefile
@@ -296,7 +296,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
HOSTCC = gcc
HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
+HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
HOSTCXXFLAGS = -O2
ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)