From 1d2d05b30506c5758da94f1cd3860f3d58a87db0 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Jan 21 2021 23:31:28 +0000 Subject: Compile the debug build with -O0 instead of -Og (rhbz#1818857) --- diff --git a/python3.9.spec b/python3.9.spec index e77191e..ca35ea1 100644 --- a/python3.9.spec +++ b/python3.9.spec @@ -17,7 +17,7 @@ URL: https://www.python.org/ #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 3%{?dist} License: Python @@ -867,9 +867,13 @@ BuildPython() { # Call the above to build each configuration. %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 \ "--without-ensurepip --with-pydebug" \ - "-Og" + "-O0 -Wno-cpp" %endif # with debug_build BuildPython optimized \ @@ -1211,8 +1215,6 @@ CheckPython() { # test_distutils # distutils.tests.test_bdist_rpm tests fail when bootstraping the Python # 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 \ -wW --slowest -j0 --timeout=1800 \ %if %{with bootstrap} @@ -1221,9 +1223,6 @@ CheckPython() { %ifarch %{mips64} -x test_ctypes \ %endif - %ifarch %{arm} - -x test_gdb \ - %endif echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName @@ -1754,6 +1753,9 @@ CheckPython optimized # ====================================================== %changelog +* Wed Jan 20 2021 Charalampos Stratakis - 3.9.1-3 +- Compile the debug build with -O0 instead of -Og (rhbz#1818857) + * Wed Jan 20 2021 Miro HronĨok - 3.9.1-2 - Security fix for CVE-2021-3177 diff --git a/tests/tests.yml b/tests/tests.yml index 6d805e9..c2d5a6f 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -30,7 +30,7 @@ run: VERSION=3.9 PYTHON=python3-debug X="-x test_wsgiref" ./parallel.sh - debugflags: dir: python/flags - run: python3-debug ./assertflags.py -Og + run: python3-debug ./assertflags.py -O0 - marshalparser: dir: python/marshalparser run: VERSION=3.9 SAMPLE=10 test_marshalparser_compatibility.sh