]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Refactor qemu_kvm_arches definition
authorAndrea Bolognani <abologna@redhat.com>
Mon, 5 Oct 2020 16:56:50 +0000 (18:56 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 9 Oct 2020 12:34:26 +0000 (14:34 +0200)
There's no need to set a default for it if we're going to override
it immediately afterwards anyway, and setting with_qemu_tcg at the
same time only makes things more confusing.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
libvirt.spec.in

index 59224f55ce1bc941511226433e02ef678a2d537b..f3b0c1f28e7f453d20704d9c87ee5cae22bd8f49 100644 (file)
     %define _vpath_builddir %{_target_platform}
 %endif
 
+%define qemu_kvm_arches         %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
+%if 0%{?rhel}
+    %define qemu_kvm_arches     x86_64 %{power64} aarch64 s390x
+%endif
+
 # The hypervisor drivers that run in libvirtd
 %define with_qemu          0%{!?_without_qemu:1}
 %define with_lxc           0%{!?_without_lxc:1}
 %define with_libxl         0%{!?_without_libxl:1}
 %define with_vbox          0%{!?_without_vbox:1}
 
-%define with_qemu_tcg      %{with_qemu}
-
-%define qemu_kvm_arches %{ix86} x86_64
-
-%if 0%{?fedora}
-    %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
-%endif
-
-%if 0%{?rhel}
-    %define with_qemu_tcg 0
-    %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
-%endif
-
 %ifarch %{qemu_kvm_arches}
     %define with_qemu_kvm      %{with_qemu}
 %else
     %define with_qemu_kvm      0
 %endif
 
+%define with_qemu_tcg      %{with_qemu}
+
+# RHEL disables TCG on all architectures
+%if 0%{?rhel}
+    %define with_qemu_tcg 0
+%endif
+
 %if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
     %define with_qemu 0
 %endif