Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463022 > unrolled thread

[PATCH] builddeb: Skip gcc-plugins when not configured

Started byKees Cook <keescook@chromium.org>
First post2016-08-15 19:40 +0200
Last post2016-08-16 10:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] builddeb: Skip gcc-plugins when not configured Kees Cook <keescook@chromium.org> - 2016-08-15 19:40 +0200
    Re: [PATCH] builddeb: Skip gcc-plugins when not configured Michal Marek <mmarek@suse.com> - 2016-08-16 10:40 +0200

#1463022 — [PATCH] builddeb: Skip gcc-plugins when not configured

FromKees Cook <keescook@chromium.org>
Date2016-08-15 19:40 +0200
Subject[PATCH] builddeb: Skip gcc-plugins when not configured
Message-ID<s6u1I-59-31@gated-at.bofh.it>
When attempting to build a Debian kernel package, the "scripts/gcc-plugins"
directory does not exist in the output tree unless CONFIG_GCC_PLUGINS=y.
To avoid errors when not defined, this wraps the failing "find" in a config
test.

Reported-by: Frank Paulsen <frobnic+lkml@gmail.com>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
This should go into v4.8...
---
 scripts/package/builddeb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index e1c09e2f9be7..8ea9fd2b6573 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -332,7 +332,9 @@ 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.4


-- 
Kees Cook
Nexus Security

[toc] | [next] | [standalone]


#1463543

FromMichal Marek <mmarek@suse.com>
Date2016-08-16 10:40 +0200
Message-ID<s6I4G-IW-15@gated-at.bofh.it>
In reply to#1463022
Dne 15.8.2016 v 19:36 Kees Cook napsal(a):
> When attempting to build a Debian kernel package, the "scripts/gcc-plugins"
> directory does not exist in the output tree unless CONFIG_GCC_PLUGINS=y.
> To avoid errors when not defined, this wraps the failing "find" in a config
> test.
> 
> Reported-by: Frank Paulsen <frobnic+lkml@gmail.com>
> Tested-by: Christian Kujau <lists@nerdbynature.de>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> This should go into v4.8...

Applied to kbuild.git#rc-fixes.

Thanks,
Michal

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web