diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-16 11:56:40 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-28 09:11:17 +0900 |
commit | 58156ba4468f1d0de166a4330374bc9df9b74efc (patch) | |
tree | b5e8269f2248f1ce8802d3c264aedee534bd9fd7 /scripts/Makefile.host | |
parent | f17b5f06cb92ef2250513a1e154c47b78df07d40 (diff) | |
download | lwn-58156ba4468f1d0de166a4330374bc9df9b74efc.tar.gz lwn-58156ba4468f1d0de166a4330374bc9df9b74efc.zip |
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) \ _hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ $(HOSTCXXFLAGS_$(basetarget).o) -ifeq ($(KBUILD_SRC),) __hostc_flags = $(_hostc_flags) __hostcxx_flags = $(_hostcxx_flags) -else + +ifeq ($(KBUILD_EXTMOD),) +ifneq ($(KBUILD_SRC),) __hostc_flags = -I$(obj) $(call flags,_hostc_flags) __hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) endif +endif hostc_flags = -Wp,-MD,$(depfile) $(__hostc_flags) hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) |