diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-15 21:56:40 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-27 19:11:17 -0500 |
commit | 58156ba4468f1d0de166a4330374bc9df9b74efc (patch) | |
tree | b5e8269f2248f1ce8802d3c264aedee534bd9fd7 /scripts/Makefile.host | |
parent | f17b5f06cb92ef2250513a1e154c47b78df07d40 (diff) |
kbuild: skip 'addtree' and 'flags' magic for external module build
When building an external module, $(obj) is the absolute path to it.
The header search paths from ccflags-y etc. should not be tweaked.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.host')
-rw-r--r-- | scripts/Makefile.host | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 0393f75db4d4..a115259b57e7 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
@@ -67,13 +67,15 @@ _hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ | |||
67 | _hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ | 67 | _hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ |
68 | $(HOSTCXXFLAGS_$(basetarget).o) | 68 | $(HOSTCXXFLAGS_$(basetarget).o) |
69 | 69 | ||
70 | ifeq ($(KBUILD_SRC),) | ||
71 | __hostc_flags = $(_hostc_flags) | 70 | __hostc_flags = $(_hostc_flags) |
72 | __hostcxx_flags = $(_hostcxx_flags) | 71 | __hostcxx_flags = $(_hostcxx_flags) |
73 | else | 72 | |
73 | ifeq ($(KBUILD_EXTMOD),) | ||
74 | ifneq ($(KBUILD_SRC),) | ||
74 | __hostc_flags = -I$(obj) $(call flags,_hostc_flags) | 75 | __hostc_flags = -I$(obj) $(call flags,_hostc_flags) |
75 | __hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) | 76 | __hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) |
76 | endif | 77 | endif |
78 | endif | ||
77 | 79 | ||
78 | hostc_flags = -Wp,-MD,$(depfile) $(__hostc_flags) | 80 | hostc_flags = -Wp,-MD,$(depfile) $(__hostc_flags) |
79 | hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) | 81 | hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) |