]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
gcc: Add patch to improve testsuite failures, particularly mips
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 13 Aug 2023 09:24:05 +0000 (10:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Aug 2023 07:14:32 +0000 (08:14 +0100)
commitbdb744edfec77d3fb000da0fe432689089b20d02
tree6f9b236b5139c45f376a38515cc3451e37e2d125
parent2cf9013fd8df2bb67f93ffd44ccc23453cedf42a
gcc: Add patch to improve testsuite failures, particularly mips

Disable loongson-mmi runtine, qemu doesn't appear to fully support them even if some
of the instruction decoding is there.

Also disable MSA mips runtime extensions. For some reason qemu appears to accept the test
code when it shouldn't. Our selected MIPS cpu for QEMU doesn't support them.

MIPS is unusual in the gcc testsuite as it uses EFFECTIVE_TARGETS and loops
multiple times through the vector testsuite. In the case of the two above, we can
compile/link them but not run them. Even with the runtime disabled, if the code
marks it as a runtime test, it will elevate itself to that. Setting the default
target to compile therefore isn't enough.

Therefore add code to downgrade runtime tests to link tests if the hardware
support isn't there to run them. This avoids thousands of test failures. To do
this we have to hook downgrade code into the main test runner.

Enable that downgrading for other cases where hardware to run vector extensions is
unavailable to remove test failures on other architectures too.

Also, for gcc.target tests, add checks on wheter loongson or msa code can
be run before trying that, allowing downgrading of tests there to work too.

Parts of the patch may be able to be split off and acceptable to upstream with
discussion. Need to investigate why qemu-user passes the 'bad' instructions'.

For now, this should at least remove hundreds of test failures and improve test
failures on non-mips too now a root cause of some was identified.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-13.2.inc
meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-mips.patch [new file with mode: 0644]