summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan, Bruce W <bruce.w.allan@intel.com>2017-03-07 15:48:23 -0800
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-03-11 11:25:57 +0900
commit4607ebf04b8190d2c7aa5504959e9fddfc0cd736 (patch)
treebfe92937441ba1ec4c08d36178033d01d134a337 /scripts
parent8b38f890eff6efc153130254a96452570f971159 (diff)
downloadlinux-4607ebf04b8190d2c7aa5504959e9fddfc0cd736.tar.gz
linux-4607ebf04b8190d2c7aa5504959e9fddfc0cd736.tar.bz2
linux-4607ebf04b8190d2c7aa5504959e9fddfc0cd736.zip
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. 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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0a07f9014944..7234e61e7ce3 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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)