Bug#1121969: python3.14: Please build with -O1 on m68k to workaround interpretor lockups

2025-12-05 Thread John Paul Adrian Glaubitz
Hi Eero,

On Fri, 2025-12-05 at 20:56 +0200, Eero Tamminen wrote:
> > +ifneq (,$(filter $(DEB_HOST_ARCH), m68k))
> > +OPT_CFLAGS += $(filter-out -O%,$(DPKG_CFLAGS)) -O1
> > +OPT_PIE_CFLAGS += $(filter-out -O%,$(DPKG_PIE_CFLAGS)) -O1
> > +endif
> > +
> 
> Add also GCC version >=15 check to arch check?
> 
> (To avoid perf regression on older compilers.)

There is always just one default C/C++ compiler in Debian and gcc-14
will eventually be removed anyway. Plus, it's just a workaround which
I don't expect to be kept long.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#1121969: python3.14: Please build with -O1 on m68k to workaround interpretor lockups

2025-12-05 Thread John Paul Adrian Glaubitz
Source: python3.14
Version: 3.14.0-5
Severity: normal
Tags: patch
User: [email protected]
Usertags: m68k
X-Debbugs-Cc: [email protected]


Hi,

the Python interpretor currently locks up on m68k during build when building
with gcc-15. This can be worked around by building the interpretor with -O1.

Please apply the following patch as a workaround for the lockups:

--- debian/rules.orig   2025-12-05 11:44:21.571871726 +0100
+++ debian/rules2025-12-05 11:44:13.347825637 +0100
@@ -203,6 +203,11 @@
 DEBUG_CFLAGS += -fexceptions
 endif
 
+ifneq (,$(filter $(DEB_HOST_ARCH), m68k))
+OPT_CFLAGS += $(filter-out -O%,$(DPKG_CFLAGS)) -O1
+OPT_PIE_CFLAGS += $(filter-out -O%,$(DPKG_PIE_CFLAGS)) -O1
+endif
+
 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
   ifeq ($(DEB_HOST_ARCH_OS),linux)
 ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 armel armhf arm64 i386 
powerpc ppc64 ppc64el s390x))

I will try to figure out which optimization flags causes these lockups.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- debian/rules.orig   2025-12-05 11:44:21.571871726 +0100
+++ debian/rules2025-12-05 11:44:13.347825637 +0100
@@ -203,6 +203,11 @@
 DEBUG_CFLAGS += -fexceptions
 endif
 
+ifneq (,$(filter $(DEB_HOST_ARCH), m68k))
+OPT_CFLAGS += $(filter-out -O%,$(DPKG_CFLAGS)) -O1
+OPT_PIE_CFLAGS += $(filter-out -O%,$(DPKG_PIE_CFLAGS)) -O1
+endif
+
 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
   ifeq ($(DEB_HOST_ARCH_OS),linux)
 ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 armel armhf arm64 i386 
powerpc ppc64 ppc64el s390x))