From patchwork Thu Oct 15 07:57:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 530555 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 314661402BC for ; Thu, 15 Oct 2015 19:01:29 +1100 (AEDT) Received: from localhost ([::1]:46362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmdTb-0005Pb-57 for incoming@patchwork.ozlabs.org; Thu, 15 Oct 2015 04:01:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmdQb-0001A1-1R for qemu-devel@nongnu.org; Thu, 15 Oct 2015 03:58:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmdQV-0004xc-6E for qemu-devel@nongnu.org; Thu, 15 Oct 2015 03:58:20 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmdQU-0004xV-Vi for qemu-devel@nongnu.org; Thu, 15 Oct 2015 03:58:15 -0400 Received: by wicgb1 with SMTP id gb1so260652095wic.1 for ; Thu, 15 Oct 2015 00:58:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l1hF7XIW4pnvYLF+xGGCzTDF7kbLhkgqE+SgRimasTs=; b=jBLI5aVbgRKTQgzR8eAVyk1264Nl9b8mML0LgRAIAeiGBg0wK1KC4Vlh2rbEnGMRzj dE/jt5US03Iikjl0VCAA+DwMwW6BlX+/6xuvuO5aqJHVhF5h964cUV84fIFJAM0bvZRV kTbV8aBsVrqNvyFqMPETOm5u4RzLtYI1sH6+hZ1gTYIEy1m0QrlsrecGMqBvYj9WH+Tn wuyRvHnZ2Dr6+8onBwInGb/VsePxEOmnGQ1DCPfwSrazyGHJHqu2eMmmK2cQqjBTgAL3 9Njs4AsdkmwVeKG1zmVQATtGq/zgOLqpWExfKV9ap8eZ/g+8ncSQVf2V/pBoS1Y7uLaU DAKg== X-Gm-Message-State: ALoCoQlogF8cc6pNEG55USuEoYQfx3080bmaI61LL/1wdGmuDtLJLhdvJOKmzmAEW6qNd/EsMCSc X-Received: by 10.194.79.196 with SMTP id l4mr9709934wjx.93.1444895894380; Thu, 15 Oct 2015 00:58:14 -0700 (PDT) Received: from vader.pb.local ([62.217.45.26]) by smtp.gmail.com with ESMTPSA id gl7sm2821418wib.1.2015.10.15.00.58.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Oct 2015 00:58:13 -0700 (PDT) From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Thu, 15 Oct 2015 09:57:58 +0200 Message-Id: <1444895880-27681-3-git-send-email-eduardo.otubo@profitbricks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444895880-27681-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1444895880-27681-1-git-send-email-eduardo.otubo@profitbricks.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.179 Cc: namnamc@safe-mail.net, peter.maydell@linaro.org, drjones@redhat.com Subject: [Qemu-devel] [PULL 02/04] configure: arm/aarch64: allow enable-seccomp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Andrew Jones This is a revert of ae6e8ef11e6cb, 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: Andrew Jones Acked-by: Eduardo Otubo --- configure | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f08327e..7d5aab2 100755 --- a/configure +++ b/configure @@ -1876,16 +1876,34 @@ 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" + seccomp="yes" else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1" - fi - seccomp="no" + if test "$seccomp" = "yes" ; then + 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 fi ##########################################