Commit 4607ebf0 authored by Allan, Bruce W's avatar Allan, Bruce W Committed by Masahiro Yamada

kbuild: external module build warnings when KBUILD_OUTPUT set and W=1

Commit db547ef1 ("Kbuild: don't add obj tree in additional includes")
causes warnings (-Wmissing-include-dirs) when compiling external modules
with KBUILD_OUTPUT set and W=1.  This is because $src can be an absolute
path to the external module source which when prefixed with -I$(srctree)/
generates an incorrect directory path.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 8b38f890
......@@ -155,7 +155,7 @@ else
# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
# and locates generated .h files
# FIXME: Replace both with specific CFLAGS* statements in the makefiles
__c_flags = $(if $(obj),-I$(srctree)/$(src) -I$(obj)) \
__c_flags = $(if $(obj),$(call addtree,-I$(src)) -I$(obj)) \
$(call flags,_c_flags)
__a_flags = $(call flags,_a_flags)
__cpp_flags = $(call flags,_cpp_flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment