[libvirt PATCH 8/9] spec: Refactor qemu_kvm_arches definition
Neal Gompa
ngompa13 at gmail.com
Tue Oct 6 00:49:15 UTC 2020
On Mon, Oct 5, 2020 at 2:41 PM Andrea Bolognani <abologna at redhat.com> wrote:
>
> 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 at redhat.com>
> ---
> 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
>
Reviewed-by: Neal Gompa <ngompa13 at gmail.com>
--
真実はいつも一つ!/ Always, there's only one truth!
More information about the libvir-list
mailing list