diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in index 138c8e5..ca47698 100644 --- a/rpm/kernel-binary.spec.in +++ b/rpm/kernel-binary.spec.in @@ -441,6 +441,11 @@ if echo %_project | grep -Eqx -f %_sourcedir/release-projects; then fi %endif +DEBUG_INFO_TYPE="$(grep "CONFIG_DEBUG_INFO_DWARF.*=y" .config)" +DEBUG_INFO_TYPE="${DEBUG_INFO_TYPE%%=y}" +DEBUG_INFO_TYPE="${DEBUG_INFO_TYPE##CONFIG_DEBUG_INFO_}" +echo "Kernel debuginfo type: ${DEBUG_INFO_TYPE}" + ../scripts/config \ --set-str CONFIG_LOCALVERSION -%source_rel-%build_flavor \ --enable CONFIG_SUSE_KERNEL \ @@ -448,7 +453,9 @@ fi %if 0%{?__debug_package:1} --enable CONFIG_DEBUG_INFO %else - --disable CONFIG_DEBUG_INFO + --disable CONFIG_DEBUG_INFO \ + --disable CONFIG_DEBUG_INFO_"${DEBUG_INFO_TYPE}" \ + --enable CONFIG_DEBUG_INFO_NONE %endif if [ %CONFIG_MODULE_SIG = "y" ]; then