Bug#972202: python3.9: Please build with -O1 on sh4 to temporarily work around GCC bug

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.superh
Message-ID <160267053339.568781.3989940051132793029.reportbug__28602.5223716692$1602670887$gmane$org@epyc.physik.fu-berlin.de>
Source: python3.9
Severity: normal
User: [email protected]
Usertags: sh4
X-Debbugs-Cc: [email protected]

Hi!

The python3.9 interpreter currently crashes on sh4 when built with -O2 or better, building
with -O1 fixes the problem.

Could you therefore apply this change to debian/rules to unbreak python3.9 on sh4?

diff -Nru old/python3.9-3.9.0/debian/rules new/python3.9-3.9.0/debian/rules
--- old/python3.9-3.9.0/debian/rules    2020-09-03 21:33:00.000000000 +0200
+++ new/python3.9-3.9.0/debian/rules    2020-10-14 11:18:45.980403262 +0200
@@ -170,6 +170,9 @@
 ifeq ($(DEB_HOST_ARCH),ia64)
     EXTRA_OPT_CFLAGS += -O2
 endif
+ifeq ($(DEB_HOST_ARCH),sh4)
+    EXTRA_OPT_CFLAGS += -O1
+endif
 ifneq (,$(filter $(DEB_HOST_ARCH), ppc64 ppc64el))
     OPT_CFLAGS += -fexceptions
     DEBUG_CFLAGS += -fexceptions

I will try to track down which particular optimization flag causes the miscompilation
and report the issue to GCC upstream.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.