From b6aad354dc64369d5118b1f06a85aea109eb34a9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sat, 16 Aug 2025 11:15:11 +0200 Subject: [PATCH] toolchain/Config.in: add BR2_TOOLCHAIN_HAS_GCC_BUG_121567 This will be needed to work around a GCC bug affecting python3. The bug is reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121567. This bug affects GCC at least since 6.x, but we couldn't test earlier versions, so we simply assume all GCC versions are affected. Even GCC 15.x is still affected, as reported to upstream GCC. Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit 1838d8e5ea7e5c3497cefc16980da330c38e7967) Signed-off-by: Thomas Perale --- toolchain/Config.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/toolchain/Config.in b/toolchain/Config.in index 89eaa7b618..2d17860e30 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -243,6 +243,16 @@ 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