From 76b14ec1d9778dcf78dcd40bc881372e808308a7 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Mon, 11 Jul 2022 16:39:46 +0300 Subject: [PATCH] minimize hackery f debuginfo-related parts of the config --- kernel.spec | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kernel.spec b/kernel.spec index 885874b..e3ece31 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1061,14 +1061,11 @@ find . -name '*~' -o -name '*.orig' -o -name '*.append' -delete # Wipe all .gitignore/.get_maintainer.ignore files find . -name "*.g*ignore" -delete -# Enable debug info if requested. -sed -i '/CONFIG_DEBUG_INFO/d' .config -%if %build_debug -echo 'CONFIG_DEBUG_INFO=y' >> %{build_dir}/.config.append -echo 'CONFIG_DEBUG_INFO_DWARF4=y' >> %{build_dir}/.config.append -echo 'CONFIG_GDB_SCRIPTS=y' >> %{build_dir}/.config.append -%else -echo 'CONFIG_DEBUG_INFO=n' >> %{build_dir}/.config.append +# Disable debug info if requested (enabled by default) +%if ! %build_debug +sed -i -e '/CONFIG_DEBUG_INFO/d' -e '/CONFIG_GDB_SCRIPTS/d' .config +echo '# CONFIG_DEBUG_INFO is not set' >> %{build_dir}/.config.append +echo '# CONFIG_GDB_SCRIPTS is not set' >> %{build_dir}/.config.append %endif sed -i '/CONFIG_MODULE_SIG_FORCE/d' .config