Skip to contentSkip to conversation

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

PATCH In review Bruce Allan 3 participants 3 messages Mar 7, 2017 – Mar 11, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

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
index 0a07f90..7234e61 100644
@@ -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)
Acked-by on v1 1/1
#1 lore raw
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 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.

Looks good to me, sorry for the regression

#2 lore raw

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 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.

Quoted 6 lines
Quoted 2 lines

Looks good to me, sorry for the regression

Applied to linux-kbuild/fixes

Thanks!

Signature · 2 lines
Best Regards
Masahiro Yamada