All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: external module build warnings when KBUILD_OUTPUT set and W=1
@ 2017-03-07 23:48 Bruce Allan
  2017-03-08  6:59 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Allan @ 2017-03-07 23:48 UTC (permalink / raw)
  To: linux-kbuild; +Cc: mmarek, arnd

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>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 scripts/Makefile.lib |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0a07f90..7234e61 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)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: external module build warnings when KBUILD_OUTPUT set and W=1
  2017-03-07 23:48 [PATCH] kbuild: external module build warnings when KBUILD_OUTPUT set and W=1 Bruce Allan
@ 2017-03-08  6:59 ` Arnd Bergmann
  2017-03-11  5:46   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2017-03-08  6:59 UTC (permalink / raw)
  To: Bruce Allan; +Cc: linux-kbuild, Michal Marek

On Wed, Mar 8, 2017 at 12:48 AM, Bruce Allan <bruce.w.allan@intel.com> wrote:
> 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>
> Cc: Arnd Bergmann <arnd@arndb.de>

Looks good to me, sorry for the regression

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: external module build warnings when KBUILD_OUTPUT set and W=1
  2017-03-08  6:59 ` Arnd Bergmann
@ 2017-03-11  5:46   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2017-03-11  5:46 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Bruce Allan, Linux Kbuild mailing list, Michal Marek

2017-03-08 15:59 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Wed, Mar 8, 2017 at 12:48 AM, Bruce Allan <bruce.w.allan@intel.com> wrote:
>> 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>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>
> Looks good to me, sorry for the regression
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>


Applied to linux-kbuild/fixes

Thanks!


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-11  5:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-07 23:48 [PATCH] kbuild: external module build warnings when KBUILD_OUTPUT set and W=1 Bruce Allan
2017-03-08  6:59 ` Arnd Bergmann
2017-03-11  5:46   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.