1
0
Fork 0

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

Commit db547ef190 ("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: Bruce Allan <bruce.w.allan@intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
hifive-unleashed-5.1
Allan, Bruce W 2017-03-07 15:48:23 -08:00 committed by Masahiro Yamada
parent 8b38f890ef
commit 4607ebf04b
1 changed files with 1 additions and 1 deletions

View File

@ -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)