[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1122007: python3.14: Please drop -Os from CFLAGS for sh4



Source: python3.14
Version: 3.14.0-5
Severity: normal
Tags: patch
User: debian-superh@lists.debian.org
Usertags: sh4
X-Debbugs-Cc: debian-superh@lists.debian.org

Hi,

the previously applied workaround for sh4 to fix the internal compiler [1]
error with gcc-14 can be dropped now since the gcc-15 package in unstable
is using the new LRA-enabled backend on sh4 which isn't affected by the
previous register allocation problems thanks to the new register allocator
LRA.

Thus, we can drop the workaround to build python3.14 with -Os on sh4:

--- debian/rules.orig   2025-12-01 12:03:40.000000000 +0100
+++ debian/rules        2025-12-05 16:13:26.781895996 +0100
@@ -192,11 +192,7 @@
     DPKG_CPPFLAGS += -DWITH_PYMALLOC_RADIX_TREE=0
     DPKG_PIE_CPPFLAGS += -DWITH_PYMALLOC_RADIX_TREE=0
 endif
-# see https://gcc.gnu.org/PR81426
-ifneq (,$(filter $(DEB_HOST_ARCH), sh4))
-    OPT_CFLAGS += $(filter-out -O%,$(DPKG_CFLAGS)) -Os
-    OPT_PIE_CFLAGS += $(filter-out -O%,$(DPKG_PIE_CFLAGS)) -Os
-endif
+
 ifneq (,$(filter $(DEB_HOST_ARCH), ppc64 ppc64el))
     OPT_CFLAGS += -fexceptions
     OPT_PIE_CFLAGS += -fexceptions

Thanks,
Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=python3.13&arch=sh4&ver=3.13.0-2&stamp=1731428213&raw=0

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- debian/rules.orig	2025-12-01 12:03:40.000000000 +0100
+++ debian/rules	2025-12-05 16:13:26.781895996 +0100
@@ -192,11 +192,7 @@
     DPKG_CPPFLAGS += -DWITH_PYMALLOC_RADIX_TREE=0
     DPKG_PIE_CPPFLAGS += -DWITH_PYMALLOC_RADIX_TREE=0
 endif
-# see https://gcc.gnu.org/PR81426
-ifneq (,$(filter $(DEB_HOST_ARCH), sh4))
-    OPT_CFLAGS += $(filter-out -O%,$(DPKG_CFLAGS)) -Os
-    OPT_PIE_CFLAGS += $(filter-out -O%,$(DPKG_PIE_CFLAGS)) -Os
-endif
+
 ifneq (,$(filter $(DEB_HOST_ARCH), ppc64 ppc64el))
     OPT_CFLAGS += -fexceptions
     OPT_PIE_CFLAGS += -fexceptions

Reply to: