summaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-08-15 10:36:22 -0700
committerMichal Marek <mmarek@suse.com>2016-08-16 10:16:38 +0200
commitd3e2773c4ede5c62d2a92dae20e3a09b1ca55b6e (patch)
tree8bd1f94f4724b7a90564a459b17c22f3149c380d /scripts/package
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
downloadlinux-d3e2773c4ede5c62d2a92dae20e3a09b1ca55b6e.tar.bz2
builddeb: Skip gcc-plugins when not configured
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> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/builddeb4
1 files changed, 3 insertions, 1 deletions
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 -)