This macros reflects the architectures on which QEMU system emulators
are built.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt.spec.in | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 73a8faae6e..641ff179e7 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -12,15 +12,24 @@
%define with_qemu_macros 0
%endif
-%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
-%if 0%{?rhel}
- %if 0%{?rhel} > 8
- %define arches_qemu_kvm x86_64 aarch64 s390x
+%if ! %{with_qemu_macros}
+ %if 0%{?rhel}
+ %if 0%{?rhel} > 8
+ %define qemu_sysemu_host_arches aarch64 s390x x86_64
+ %else
+ %define qemu_sysemu_host_arches aarch64 s390x %{power64} x86_64
+ %endif
%else
- %define arches_qemu_kvm x86_64 %{power64} aarch64 s390x
+ %define qemu_sysemu_host_arches aarch64 %{arm} %{ix86} %{mips} %{power64} riscv64
s390x x86_64
%endif
%endif
+%if 0%{?rhel}
+ %define arches_qemu_kvm %{qemu_sysemu_host_arches}
+%else
+ %define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
+%endif
+
%define arches_64bit x86_64 %{power64} aarch64 s390x riscv64
%define arches_x86 %{ix86} x86_64
@@ -37,7 +46,11 @@
%define arches_numad %{arches_x86} %{power64} aarch64
# The hypervisor drivers that run in libvirtd
+%ifarch %{qemu_sysemu_host_arches}
%define with_qemu 0%{!?_without_qemu:1}
+%else
+%define with_qemu 0
+%endif
%define with_lxc 0%{!?_without_lxc:1}
%define with_libxl 0%{!?_without_libxl:1}
%define with_vbox 0%{!?_without_vbox:1}
@@ -55,10 +68,6 @@
%define with_qemu_tcg 0
%endif
-%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
- %define with_qemu 0
-%endif
-
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
%define with_openvz 0%{!?_without_openvz:1}
%define with_vmware 0%{!?_without_vmware:1}
--
2.41.0