summaryrefslogtreecommitdiff
path: root/scripts/Makefile.host
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-13 15:22:17 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-18 11:49:57 +0900
commitcdd750bfb1f76fe9be8cfb53cbe77b2e811081ab (patch)
treeaef9cb28da3409096df0239e3e315c4787fd5787 /scripts/Makefile.host
parent9cc342f6c4a06ea613ddef1bcaa25409260aec63 (diff)
kbuild: remove 'addtree' and 'flags' magic for header search paths
The 'addtree' and 'flags' in scripts/Kbuild.include are so compilecated and ugly. As I mentioned in [1], Kbuild should stop automatic prefixing of header search path options. I fixed up (almost) all Makefiles in the kernel. Now 'addtree' and 'flags' have been removed. Kbuild still caters to add $(srctree)/$(src) and $(objtree)/$(obj) to the header search path for O= building, but never touches extra compiler options from ccflags-y etc. [1]: https://patchwork.kernel.org/patch/9632347/ Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.host')
-rw-r--r--scripts/Makefile.host12
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 73b804197fca..b6a54bdf0965 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -67,18 +67,16 @@ _hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
_hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
$(HOSTCXXFLAGS_$(basetarget).o)
-__hostc_flags = $(_hostc_flags)
-__hostcxx_flags = $(_hostcxx_flags)
-
+# $(objtree)/$(obj) for including generated headers from checkin source files
ifeq ($(KBUILD_EXTMOD),)
ifneq ($(srctree),.)
-__hostc_flags = -I$(obj) $(call flags,_hostc_flags)
-__hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags)
+_hostc_flags += -I $(objtree)/$(obj)
+_hostcxx_flags += -I $(objtree)/$(obj)
endif
endif
-hostc_flags = -Wp,-MD,$(depfile) $(__hostc_flags)
-hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
+hostc_flags = -Wp,-MD,$(depfile) $(_hostc_flags)
+hostcxx_flags = -Wp,-MD,$(depfile) $(_hostcxx_flags)
#####
# Compile programs on the host