public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-kbuild@vger.kernel.org, Emese Revfy <re.emese@gmail.com>,
	Michal Marek <mmarek@suse.com>
Subject: [PATCH] kbuild/builddeb: Fix !CONFIG_GCC_PLUGINS build
Date: Sat,  3 Sep 2016 21:58:50 +0200	[thread overview]
Message-ID: <1472932730-1098-1-git-send-email-bp@alien8.de> (raw)

From: Borislav Petkov <bp@suse.de>

When building a bindeb-pkg target into an object output dir, i.e., O=, I
get:

  find: `scripts/gcc-plugins': No such file or directory
  /mnt/kernel/kernel/linux-2.6/scripts/package/Makefile:97: recipe for target 'bindeb-pkg' failed
  make[3]: *** [bindeb-pkg] Error 1
  /mnt/kernel/kernel/linux-2.6/Makefile:1310: recipe for target 'bindeb-pkg' failed
  ...

Check whether CONFIG_GCC_PLUGINS is enabled before collecting .so plugin
names.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Emese Revfy <re.emese@gmail.com>
Cc: Michal Marek <mmarek@suse.com>
---
 scripts/package/builddeb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index e1c09e2f9be7..2e5b5f582365 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -332,7 +332,11 @@ if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then
 	(cd $objtree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrobjfiles"
 fi
 (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
-(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles"
+
+if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then
+	(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles"
+fi
+
 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
 mkdir -p "$destdir"
 (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
-- 
2.7.3

             reply	other threads:[~2016-09-03 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03 19:58 Borislav Petkov [this message]
2016-09-05  6:38 ` [PATCH] kbuild/builddeb: Fix !CONFIG_GCC_PLUGINS build Michal Marek
2016-09-05  7:45   ` Borislav Petkov

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=1472932730-1098-1-git-send-email-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=re.emese@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox