From dd83c1a374c4bbef146084206b31e00915e732f4 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Thu, 19 Sep 2024 18:20:28 -0600
Subject: [PATCH] qemu: only build one system binary for current architecture

---
 recipes/wip/vm/qemu/recipe.toml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/recipes/wip/vm/qemu/recipe.toml b/recipes/wip/vm/qemu/recipe.toml
index 3bf327f95..ed8cd3856 100644
--- a/recipes/wip/vm/qemu/recipe.toml
+++ b/recipes/wip/vm/qemu/recipe.toml
@@ -30,5 +30,20 @@ COOKBOOK_CONFIGURE_FLAGS=(
     --static
     --disable-tpm
 )
+case "${TARGET}" in
+    aarch64-unknown-redox)
+        COOKBOOK_CONFIGURE_FLAGS+=(--target-list=aarch64-softmmu)
+        ;;
+    i686-unknown-redox)
+        COOKBOOK_CONFIGURE_FLAGS+=(--target-list=i386-softmmu)
+        ;;
+    x86_64-unknown-redox)
+        COOKBOOK_CONFIGURE_FLAGS+=(--target-list=x86_64-softmmu)
+        ;;
+    *)
+        echo "unsupported target ${TARGET}"
+        exit 1
+        ;;
+esac
 cookbook_configure
 """
-- 
GitLab