From c55f7eb582e6c9bfcefbcc878143a215dd0d0ed0 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 14 Dec 2025 16:37:09 +0100 Subject: [PATCH] toolchain/Config.in: drop BR2_TOOLCHAIN_HAS_GCC_BUG_121567 GCC bug 121567 is actually a duplicate of GCC bug 81426, which already existed upstream, and for which we already had BR2_TOOLCHAIN_HAS_GCC_BUG_81246. In addition, BR2_TOOLCHAIN_HAS_GCC_BUG_81246 is correctly defined as affecting SuperH regardless of the optimization level. Indeed, when BR2_TOOLCHAIN_HAS_GCC_BUG_121567 was introduced, it was thought that only -O2 and -O3 levels are affected, but -Og, -O1 and -Ofast are also affected, causing the python3 build to fail. Fixes: https://autobuild.buildroot.net/results/aca1812415ee84eef223b0fdff88f31a39775294/ (-O1 build) https://autobuild.buildroot.net/results/3fd91ce3ff8727d2f9c12f6721df922c60282d70/ (-Ofast build) https://autobuild.buildroot.net/results/e5536dcf598a51f5006343513a76f4e223e80a55/ (-Og build) Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit 2667cab664b568ff0619dacf5d0b38d5926aff61) Signed-off-by: Thomas Perale --- package/python3/python3.mk | 2 +- toolchain/Config.in | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 4e660ecee2..0690678c04 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -191,7 +191,7 @@ endif PYTHON3_CFLAGS = $(TARGET_CFLAGS) -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_121567),y) +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_81426),y) PYTHON3_CFLAGS += -O0 endif diff --git a/toolchain/Config.in b/toolchain/Config.in index 8330e652c2..99337a1873 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -141,6 +141,9 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_68485 default y if BR2_microblaze # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426 +# error: unable to find a register to spill in class ‘R0_REGS’ +# The bug exists at least since gcc 6.x, so we are assuming it affects +# all GCC versions. config BR2_TOOLCHAIN_HAS_GCC_BUG_81426 bool default y if BR2_sh @@ -243,16 +246,6 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_111001 BR2_OPTIMIZE_2 || \ BR2_OPTIMIZE_3 -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121567 -# error: unable to find a register to spill in class ‘R0_REGS’ -# The bug exists at least since gcc 6.x, so we are assuming it affects -# all GCC versions. -config BR2_TOOLCHAIN_HAS_GCC_BUG_121567 - bool - default y if BR2_sh - depends on BR2_OPTIMIZE_2 || \ - BR2_OPTIMIZE_3 - config BR2_TOOLCHAIN_HAS_NATIVE_RPC bool