All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Bjørn Mork" <bjorn@mork.no>
Subject: [PATCH] builddeb: include objtool binary in headers package
Date: Wed,  4 May 2016 15:35:39 +0200	[thread overview]
Message-ID: <1462368939-1018-1-git-send-email-bjorn@mork.no> (raw)

"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

             reply	other threads:[~2016-05-04 13:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 13:35 Bjørn Mork [this message]
2016-05-10 15:41 ` [PATCH] builddeb: include objtool binary in headers package Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462368939-1018-1-git-send-email-bjorn@mork.no \
    --to=bjorn@mork.no \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.