Better regulation of CONFIG_DEBUGINFO*, make UML binary really not stripped

This commit is contained in:
Mikhail Novosyolov 2020-03-13 20:51:12 +03:00
parent b320b958ee
commit de78db5b2c

View file

@ -11,7 +11,7 @@
%define sublevel 6
# Release number. Increase this before a rebuild.
%define rpmrel 4
%define rpmrel 5
%define fullrpmrel %{rpmrel}
%define rpmtag %{disttag}
@ -808,13 +808,18 @@ sed -i 's/CONFIG_STACKPROTECTOR=y/# CONFIG_STACKPROTECTOR is not set/' .config
sed -i 's/CONFIG_STACKPROTECTOR_STRONG=y/# CONFIG_STACKPROTECTOR_STRONG is not set/' .config
%endif
# Enable debug info if requested.
%if %build_debug
sed -i 's/# CONFIG_DEBUG_INFO is not set/CONFIG_DEBUG_INFO=y\nCONFIG_DEBUG_INFO_DWARF4=y\nCONFIG_GDB_SCRIPTS=y/' .config
%endif
touch %{build_dir}/.config.append
# 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
%endif
%if %{enhanced_security}
### SELinux enablement
# seems to be needed to boot system in enforcing selinux mode