mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: make samples really depend on headers_install
@ 2018-08-08  2:14 Masahiro Yamada
  2018-08-08  2:23 ` Masahiro Yamada
  2018-08-08 10:45 ` David Howells
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-08-08  2:14 UTC (permalink / raw)
  To: David Howells
  Cc: Stephen Rothwell, Arnd Bergmann, linux-kbuild, Al Viro,
	Masahiro Yamada, Michal Marek, linux-kernel

Kernel headers must be installed into $(objtree)/usr/include to avoid
the build failure of samples.

Commit ddea05fa148b ("kbuild: make samples depend on headers_install")
addressed this, but "samples/" is only used for the single target build.

"make samples/" properly installs kernel headers, but it does not work
for general building because a phony target "sample" (no trailing slash)
is used.

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v2:
  - Correct commit log (backslash -> slash)
  - Fix a typo

 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7a3c454..1e47d13 100644
--- a/Makefile
+++ b/Makefile
@@ -1009,9 +1009,10 @@ ifdef CONFIG_GDB_SCRIPTS
 endif
 	+$(call if_changed,link-vmlinux)
 
-# Build samples along the rest of the kernel
+# Build samples along the rest of the kernel. This needs headers_install.
 ifdef CONFIG_SAMPLES
 vmlinux-dirs += samples
+samples: headers_install
 endif
 
 # The actual objects are generated when descending,
-- 
2.7.4


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

* Re: [PATCH v2] kbuild: make samples really depend on headers_install
  2018-08-08  2:14 [PATCH v2] kbuild: make samples really depend on headers_install Masahiro Yamada
@ 2018-08-08  2:23 ` Masahiro Yamada
  2018-08-08 10:45 ` David Howells
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-08-08  2:23 UTC (permalink / raw)
  To: David Howells
  Cc: Stephen Rothwell, Arnd Bergmann, Linux Kbuild mailing list,
	Al Viro, Masahiro Yamada, Michal Marek,
	Linux Kernel Mailing List

2018-08-08 11:14 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Kernel headers must be installed into $(objtree)/usr/include to avoid
> the build failure of samples.
>
> Commit ddea05fa148b ("kbuild: make samples depend on headers_install")
> addressed this, but "samples/" is only used for the single target build.
>
> "make samples/" properly installs kernel headers, but it does not work
> for general building because a phony target "sample" (no trailing slash)
> is used.
>
> Reported-by: David Howells <dhowells@redhat.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---


David,
Could you check this patch, please?

Will you apply this to your tree
to fix the vfs sample issue?

Please let me know your thought.

Thanks.





> Changes in v2:
>   - Correct commit log (backslash -> slash)
>   - Fix a typo
>
>  Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 7a3c454..1e47d13 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1009,9 +1009,10 @@ ifdef CONFIG_GDB_SCRIPTS
>  endif
>         +$(call if_changed,link-vmlinux)
>
> -# Build samples along the rest of the kernel
> +# Build samples along the rest of the kernel. This needs headers_install.
>  ifdef CONFIG_SAMPLES
>  vmlinux-dirs += samples
> +samples: headers_install
>  endif
>
>  # The actual objects are generated when descending,
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH v2] kbuild: make samples really depend on headers_install
  2018-08-08  2:14 [PATCH v2] kbuild: make samples really depend on headers_install Masahiro Yamada
  2018-08-08  2:23 ` Masahiro Yamada
@ 2018-08-08 10:45 ` David Howells
  1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2018-08-08 10:45 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: dhowells, Stephen Rothwell, Arnd Bergmann,
	Linux Kbuild mailing list, Al Viro, Michal Marek,
	Linux Kernel Mailing List

Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Could you check this patch, please?

That seems to work.

Tested-by: David Howells <dhowells@redhat.com>

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

end of thread, other threads:[~2018-08-08 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08  2:14 [PATCH v2] kbuild: make samples really depend on headers_install Masahiro Yamada
2018-08-08  2:23 ` Masahiro Yamada
2018-08-08 10:45 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome