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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -155,7 +155,7 @@ else · 154 unmodified lines | |||
| 155 | # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files | 155 | # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files |
| 156 | # and locates generated .h files | 156 | # and locates generated .h files |
| 157 | # FIXME: Replace both with specific CFLAGS* statements in the makefiles | 157 | # 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) |