diff mbox series

[3/8] gcc-testsuite: Set qemu options for mips correctly

Message ID 20230813115410.163212-3-richard.purdie@linuxfoundation.org
State New
Headers show
Series [1/8] resulttool/report: Avoid divide by zero | expand

Commit Message

Richard Purdie Aug. 13, 2023, 11:54 a.m. UTC
MIPS sets QEMU CPU values similarly to ppc and doens't support 'max'.
Allow this to filter through correctly to the toolchain testing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/gcc/gcc-testsuite.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-testsuite.inc b/meta/recipes-devtools/gcc/gcc-testsuite.inc
index a8299fa7aeb..788a94ff5b6 100644
--- a/meta/recipes-devtools/gcc/gcc-testsuite.inc
+++ b/meta/recipes-devtools/gcc/gcc-testsuite.inc
@@ -53,8 +53,10 @@  python check_prepare() {
         #   - valid for x86*, powerpc, arm, arm64
         if qemu_binary.endswith(("x86_64", "i386", "arm", "aarch64")):
             args += ["-cpu", "max"]
-        elif qemu_binary.endswith(("ppc")):
+        elif qemu_binary.endswith(("ppc", "mips", "mips64")):
             args += d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')).split()
+        # For mips64 we could set a maximal CPU (e.g. Loongson-3A4000) however they either have MSA
+        # or Loongson-MMI vector extensions, not both and qemu lacks complete support for MMI
         sysroot = d.getVar("RECIPE_SYSROOT")
         args += ["-L", sysroot]
         # lib paths are static here instead of using $libdir since this is used by a -cross recipe