summaryrefslogtreecommitdiff
path: root/scripts/package/mkspec
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/mkspec')
-rwxr-xr-xscripts/package/mkspec10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 4dc1466dfc81..c7375bfc25a9 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -23,6 +23,16 @@ else
echo '%define with_devel 0'
fi
+# debuginfo package generation uses find-debuginfo.sh under the hood,
+# which only works on uncompressed modules that contain debuginfo
+if grep -q CONFIG_DEBUG_INFO=y include/config/auto.conf &&
+ (! grep -q CONFIG_MODULE_COMPRESS=y include/config/auto.conf) &&
+ (! grep -q CONFIG_DEBUG_INFO_SPLIT=y include/config/auto.conf); then
+echo '%define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}'
+else
+echo '%define with_debuginfo 0'
+fi
+
cat<<EOF
%define ARCH ${ARCH}
%define KERNELRELEASE ${KERNELRELEASE}