History

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

Commit db547ef19064 ("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.

Allan, Bruce W committed 9 years ago

Commit 4607ebf1 parent 8b38f891 file · +1 −1Browse files

Unified · Split

scripts/Makefile.lib+1−1
@@ -155,7 +155,7 @@ else · 154 unmodified lines
155# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files155# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
156# and locates generated .h files156# and locates generated .h files
157# FIXME: Replace both with specific CFLAGS* statements in the makefiles157# FIXME: Replace both with specific CFLAGS* statements in the makefiles
158__c_flags = $(if $(obj),-I$(srctree)/$(src) -I$(obj)) \158__c_flags = $(if $(obj),$(call addtree,-I$(src)) -I$(obj)) \
159 $(call flags,_c_flags)159 $(call flags,_c_flags)
160__a_flags = $(call flags,_a_flags)160__a_flags = $(call flags,_a_flags)
161__cpp_flags = $(call flags,_cpp_flags)161__cpp_flags = $(call flags,_cpp_flags)