Compile the debug build with -O0 instead of -Og (rhbz#1818857)

This commit is contained in:
Charalampos Stratakis 2020-09-16 18:28:23 +02:00 committed by Miro Hrončok
parent ca1a606565
commit 1d2d05b305
2 changed files with 10 additions and 8 deletions

View File

@ -17,7 +17,7 @@ URL: https://www.python.org/
#global prerel ... #global prerel ...
%global upstream_version %{general_version}%{?prerel} %global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}} Version: %{general_version}%{?prerel:~%{prerel}}
Release: 2%{?dist} Release: 3%{?dist}
License: Python License: Python
@ -867,9 +867,13 @@ BuildPython() {
# Call the above to build each configuration. # Call the above to build each configuration.
%if %{with debug_build} %if %{with debug_build}
# The debug build is compiled with the lowest level of optimizations as to not optimize
# out frames. We also suppress the warnings as the default distro value of the FORTIFY_SOURCE
# option produces too many warnings when compiling at the O0 optimization level.
# See also: https://bugzilla.redhat.com/show_bug.cgi?id=1818857
BuildPython debug \ BuildPython debug \
"--without-ensurepip --with-pydebug" \ "--without-ensurepip --with-pydebug" \
"-Og" "-O0 -Wno-cpp"
%endif # with debug_build %endif # with debug_build
BuildPython optimized \ BuildPython optimized \
@ -1211,8 +1215,6 @@ CheckPython() {
# test_distutils # test_distutils
# distutils.tests.test_bdist_rpm tests fail when bootstraping the Python # distutils.tests.test_bdist_rpm tests fail when bootstraping the Python
# package: rpmbuild requires /usr/bin/pythonX.Y to be installed # package: rpmbuild requires /usr/bin/pythonX.Y to be installed
# test_gdb on arm:
# https://bugzilla.redhat.com/show_bug.cgi?id=1846390
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \ LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
-wW --slowest -j0 --timeout=1800 \ -wW --slowest -j0 --timeout=1800 \
%if %{with bootstrap} %if %{with bootstrap}
@ -1221,9 +1223,6 @@ CheckPython() {
%ifarch %{mips64} %ifarch %{mips64}
-x test_ctypes \ -x test_ctypes \
%endif %endif
%ifarch %{arm}
-x test_gdb \
%endif
echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
@ -1754,6 +1753,9 @@ CheckPython optimized
# ====================================================== # ======================================================
%changelog %changelog
* Wed Jan 20 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.9.1-3
- Compile the debug build with -O0 instead of -Og (rhbz#1818857)
* Wed Jan 20 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9.1-2 * Wed Jan 20 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9.1-2
- Security fix for CVE-2021-3177 - Security fix for CVE-2021-3177

View File

@ -30,7 +30,7 @@
run: VERSION=3.9 PYTHON=python3-debug X="-x test_wsgiref" ./parallel.sh run: VERSION=3.9 PYTHON=python3-debug X="-x test_wsgiref" ./parallel.sh
- debugflags: - debugflags:
dir: python/flags dir: python/flags
run: python3-debug ./assertflags.py -Og run: python3-debug ./assertflags.py -O0
- marshalparser: - marshalparser:
dir: python/marshalparser dir: python/marshalparser
run: VERSION=3.9 SAMPLE=10 test_marshalparser_compatibility.sh run: VERSION=3.9 SAMPLE=10 test_marshalparser_compatibility.sh