upstream: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11729

diff --git a/meson.build b/meson.build
index 3d72bb56f25..5161c97af11 100644
--- a/meson.build
+++ b/meson.build
@@ -496,7 +496,7 @@ foreach c_arg : get_option('c_args')
     break
   endif
 endforeach
-if not have_mtls_dialect
+if not have_mtls_dialect and host_machine.cpu_family() != 'riscv64'
   # need .run to check libc support. meson aborts when calling .run when
   # cross-compiling, but because this is just an optimization we can skip it
   if meson.is_cross_build() and not meson.can_run_host_binaries()
