kbuild: external module build warnings when KBUILD_OUTPUT set and W=1
PATCH 1/1 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.
--- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.lib +1 -1
@@ -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)
Quoted 8 lines · Bruce Allan
Commit
db547ef19064("Kbuild: don't add obj tree in additional includes") causes warnings (-Wmissing-include-dirs) when compiling external modules withKBUILD_OUTPUTset 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 <[email protected]>Cc Arnd Bergmann <[email protected]>
Looks good to me, sorry for the regression
2017-03-08 15:59 GMT+09:00 Arnd Bergmann <[email protected]>:
Quoted 7 lines · Bruce Allan
Quoted 6 lines
Commit
db547ef19064("Kbuild: don't add obj tree in additional includes") causes warnings (-Wmissing-include-dirs) when compiling external modules withKBUILD_OUTPUTset 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.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Bruce Allan <[email protected]>Cc Arnd Bergmann <[email protected]>Looks good to me, sorry for the regression
Acked-by Arnd Bergmann <[email protected]>
Applied to linux-kbuild/fixes
Thanks!
Signature · 2 lines
Best Regards Masahiro Yamada