Commit 693e5910 authored by Andrew Jones's avatar Andrew Jones Committed by Eduardo Otubo
Browse files

configure: arm/aarch64: allow enable-seccomp



This is a revert of ae6e8ef1, but with a bit of refactoring,
and also specifically adding arm/aarch64, rather than all
architectures. Currently, libseccomp code appears to also support
mips, ppc, and s390. We could therefore allow qemu to enable
seccomp for those platforms as well, with additional configure
patches, given they're tested and proven to work.

Signed-off-by: default avatarAndrew Jones <drjones@redhat.com>
Acked-by: default avatarEduardo Otubo <eduardo.otubo@profitbricks.com>
parent 47d2067a
Loading
Loading
Loading
Loading
+25 −7
Original line number Diff line number Diff line
@@ -1888,14 +1888,32 @@ fi
# libseccomp check

if test "$seccomp" != "no" ; then
    if test "$cpu" = "i386" || test "$cpu" = "x86_64" &&
        $pkg_config --atleast-version=2.1.1 libseccomp; then
    case "$cpu" in
    i386|x86_64)
        libseccomp_minver="2.1.1"
        ;;
    arm|aarch64)
        libseccomp_minver="2.2.3"
        ;;
    *)
        libseccomp_minver=""
        ;;
    esac

    if test "$libseccomp_minver" != "" &&
       $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then
        libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`"
        QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`"
        seccomp="yes"
    else
        if test "$seccomp" = "yes" ; then
            feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1"
            if test "$libseccomp_minver" != "" ; then
                feature_not_found "libseccomp" \
                    "Install libseccomp devel >= $libseccomp_minver"
            else
                feature_not_found "libseccomp" \
                    "libseccomp is not supported for host cpu $cpu"
            fi
        fi
        seccomp="no"
    fi