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@xxxxxxxxxx> --- libvirt.spec.in | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index e036307d30..b62b17ee80 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -17,31 +17,31 @@ %define _vpath_builddir %{_target_platform} %endif +%if 0%{?fedora} + %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64 +%else + %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 -- 2.26.2