linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] builddeb: include objtool binary in headers package
@ 2016-05-04 13:35 Bjørn Mork
  2016-05-10 15:41 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Bjørn Mork @ 2016-05-04 13:35 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kbuild, linux-kernel, Bjørn Mork

"objtool" is required for building external m dules if "Compile-time
stack metadata validation" is enabled.  Otherwise all builds based
on the headers package fail with:

 make[1]: Entering directory '/usr/src/linux-headers-4.6.0-rc6'
 make[2]: *** No rule to make target 'tools/objtool/objtool', needed by 'foo.o'.  Stop.
 Makefile:1598: recipe for target 'foo.ko' failed
 make[1]: *** [foo.ko] Error 2
 make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-rc6'

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 scripts/package/builddeb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 6c3b038ef40d..93d3b157298d 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -322,6 +322,9 @@ fi
 
 # Build kernel header package
 (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
+if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then
+	(cd $srctree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrsrcfiles"
+fi
 (cd $srctree; find arch/$SRCARCH/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
 (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
 (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
-- 
2.1.4

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

* Re: [PATCH] builddeb: include objtool binary in headers package
  2016-05-04 13:35 [PATCH] builddeb: include objtool binary in headers package Bjørn Mork
@ 2016-05-10 15:41 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-05-10 15:41 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: linux-kbuild, linux-kernel

On Wed, May 04, 2016 at 03:35:39PM +0200, Bjørn Mork wrote:
> "objtool" is required for building external m dules if "Compile-time
> stack metadata validation" is enabled.  Otherwise all builds based
> on the headers package fail with:
> 
>  make[1]: Entering directory '/usr/src/linux-headers-4.6.0-rc6'
>  make[2]: *** No rule to make target 'tools/objtool/objtool', needed by 'foo.o'.  Stop.
>  Makefile:1598: recipe for target 'foo.ko' failed
>  make[1]: *** [foo.ko] Error 2
>  make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-rc6'
> 
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
> ---
>  scripts/package/builddeb | 3 +++
>  1 file changed, 3 insertions(+)

Applied to kbuild.git#misc.

Michal

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

end of thread, other threads:[~2016-05-10 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-04 13:35 [PATCH] builddeb: include objtool binary in headers package Bjørn Mork
2016-05-10 15:41 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).