From patchwork Mon Nov 16 09:09:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 56691 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1577659lbb; Mon, 16 Nov 2015 14:03:34 -0800 (PST) X-Received: by 10.31.178.148 with SMTP id b142mr146909vkf.158.1447711414335; Mon, 16 Nov 2015 14:03:34 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p16si134119vkp.10.2015.11.16.14.03.34 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Nov 2015 14:03:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dkim=fail header.i=@profitbricks_com.20150623.gappssmtp.com Received: from localhost ([::1]:50374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyRs5-0004Hm-UB for patch@linaro.org; Mon, 16 Nov 2015 17:03:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyFmt-0006Uw-Bv for qemu-devel@nongnu.org; Mon, 16 Nov 2015 04:09:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyFmp-0000HH-En for qemu-devel@nongnu.org; Mon, 16 Nov 2015 04:09:23 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:38685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyFmp-0000HB-8q for qemu-devel@nongnu.org; Mon, 16 Nov 2015 04:09:19 -0500 Received: by wmec201 with SMTP id c201so109667271wme.1 for ; Mon, 16 Nov 2015 01:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=profitbricks_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xa1sFp8HKkxnXQAbDv9CNVNBdDAjczpME1yQN2FCy7Q=; b=kO4EnprchErsnddJOpUhlFHK3W1QGJhb2aoWx2vJXcXO20xfW0+POhAkwk2r/5v4tB 6BVWVNFm6ZVmGEGDqgi1EI/X6Xvff4mWewQRsoMA6at8+iyc1FjfJDvldj5NsKJA15IZ tkoR9NnBsoutSWxt7Afsx/MokHCnctqZVqRIp4uxC1LpFXX6SgZ1Y5ANE831u2DdlaYa JaSzJmdwcmEAkUjOM3q/DVzQCz4skBVRk4lhXmFwQG7bjR0OzSUkRyhu2Y1Cor0q324H wIt3UxRXFU/CFlVLJLEHuifQxZ69UJndMUxmlIkKWEoTglKhnC7DaXOn6s9jrGoWy4jL etng== 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=Xa1sFp8HKkxnXQAbDv9CNVNBdDAjczpME1yQN2FCy7Q=; b=CVA3W9uCKRwUbpm7XTQNOngkgCDd7zxdk+BDBYa4Ce/b42GoYY2Zg9F0wNIQDeu92N gKg6744WXxBUIObz9VvADiDWCIpU5wyL9hfDyncjW3+Wu4ZMl8+3jEgTFj7UmrBHjmMQ sQKp6sZVQ9U82DeclJFcrHzSu3BKqSJbIpYcr7PYxcnaIODYB+9DzBIWYrkYwhRmKEHU iohoDDb3+LlOCBKTKb7qT/jXda/AnXfsU8T8gTDBLwU7kPStzAjW7WEqh8ey1FbVNBNJ nSSeCA9IxAjKkaOuFBsc2OWBvnHt6FEMfq7KfKX8V6+WMu0XkQ7EEH4XIWx/xouVDkXc OjMA== X-Gm-Message-State: ALoCoQn+F5jeLN5mex28FNWWvDj8PHWrGkAj4LS0jiJBL2I5x3wAUNJR4ouG2+7lTM3x6mUk/zI9 X-Received: by 10.194.87.230 with SMTP id bb6mr34786450wjb.157.1447664958648; Mon, 16 Nov 2015 01:09:18 -0800 (PST) Received: from vader.pb.local ([62.217.45.26]) by smtp.gmail.com with ESMTPSA id d66sm17449709wma.21.2015.11.16.01.09.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Nov 2015 01:09:18 -0800 (PST) From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Mon, 16 Nov 2015 10:09:06 +0100 Message-Id: <1447664947-31044-3-git-send-email-eduardo.otubo@profitbricks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447664947-31044-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1447664947-31044-1-git-send-email-eduardo.otubo@profitbricks.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::22c Cc: peter.maydell@linaro.org, drjones@redhat.com, dann.frazier@canonical.com Subject: [Qemu-devel] [PULL 02/03] 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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(-) -- 2.1.4 diff --git a/configure b/configure index f75df4b..dd47d9b 100755 --- a/configure +++ b/configure @@ -1888,16 +1888,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 ##########################################