Files
Yegor Yefremov 9690acc8f4 package/cairo: work around gcc bug 125410 on hppa
GCC 16 uses LRA by default on hppa, and crashes while compiling
cairo-pattern.c:

../src/cairo-pattern.c: In function 'cairo_mesh_pattern_end_patch':
../src/cairo-pattern.c:1417:1: error: unrecognizable insn:
(insn 325 0 0 (set (reg/f:SI 381)
        (mem/f/c:SI (plus:SI (reg/f:SI 89 sfp)
                (const_int -184 [0xffffffffffffff48])) [25 p[0][0]+0 S4 A64])) -1
     (nil))
during RTL pass: reload
../src/cairo-pattern.c:1417:1: internal compiler error: in extract_insn, at recog.cc:2892

This is GCC bug 125410 [1], reported upstream with a test case reduced
from this very cairo function, and still open. GCC 15 is not affected,
and with GCC 16 both the test case and cairo build when passing
-mno-lra, as reported in [2].

Add BR2_TOOLCHAIN_HAS_GCC_BUG_125410 for hppa with GCC >= 16, and pass
-mno-lra to cairo in that case, so that the old reload pass is used.

This issue has been present since commit 1b290781cf ("package/gcc:
add version 16.1.0"), which made GCC 16 available. It therefore
affects 2026.08 and later, including the 2026.08.x maintenance
branch.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125410
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125410#c2

Fixes:
https://autobuild.buildroot.org/results/f76b8f361d01eef892ad21722b099ba8bacfcc57
https://autobuild.buildroot.org/results/a5ee815bd49784cc522e76e49a2a021a151a9e57
https://autobuild.buildroot.org/results/54bbea14bef321c193d9b6450b253edf832c6b8d

Fixes: 1b290781cf ("package/gcc: add version 16.1.0")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-11-14 10:41:04 +01:00
..