From patchwork Wed Oct 14 09:38:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 54897 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 8596F20490 for ; Wed, 14 Oct 2015 09:42:09 +0000 (UTC) Received: by lbwr8 with SMTP id r8sf22842582lbw.0 for ; Wed, 14 Oct 2015 02:42:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=l1hF7XIW4pnvYLF+xGGCzTDF7kbLhkgqE+SgRimasTs=; b=lbYRM43QbgQs2KLfNd8GJcFk2weEpoS6yhPS/yC2r84BtytZ9o0viXz7ndO5mgxz+Q 2jIMbSYABifefTVql6M0M8JCRJ2O+uml2Yzq4OfqAcGJJ8a+k103nWBR38r1eSjP+F7g uw58zC246pnuG5kFGmHtJp+Dtxwdd7m8TPbdOBPQhPWfCbfG6U+99N0phMIqKwI4kpBF 19anEdbM4/rGFQICNazYB50+RT7NluLAaBSKPeyX8Oa6RlmIuOmY8IE6JZHyffW5hvxL rSr/B1BX+fYcBgYKehCdDhPGdKl84WAzeCiKoT1lyGCKFcjJskQdhoGkZ7GcUUXc69z2 78ng== X-Gm-Message-State: ALoCoQlsEZuC7ISUvD82YELziJziSfBYySSbyN3e79jvvnHddd9Ib7hyB41PiNuEeDNIFcM5cycA X-Received: by 10.112.136.99 with SMTP id pz3mr532983lbb.11.1444815728534; Wed, 14 Oct 2015 02:42:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.210.198 with SMTP id j189ls15653lfg.86.gmail; Wed, 14 Oct 2015 02:42:08 -0700 (PDT) X-Received: by 10.112.150.201 with SMTP id uk9mr1075873lbb.102.1444815728387; Wed, 14 Oct 2015 02:42:08 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id p76si4980658lfp.100.2015.10.14.02.42.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 02:42:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbpp2 with SMTP id pp2so12748670lbb.0 for ; Wed, 14 Oct 2015 02:42:08 -0700 (PDT) X-Received: by 10.112.135.9 with SMTP id po9mr1084172lbb.56.1444815728282; Wed, 14 Oct 2015 02:42:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2615161lbq; Wed, 14 Oct 2015 02:42:07 -0700 (PDT) X-Received: by 10.140.233.146 with SMTP id e140mr2707249qhc.90.1444815727403; Wed, 14 Oct 2015 02:42:07 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 207si6997551qht.126.2015.10.14.02.42.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 14 Oct 2015 02:42:07 -0700 (PDT) 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; Received: from localhost ([::1]:41351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmIZS-0006ax-TI for patch@linaro.org; Wed, 14 Oct 2015 05:42:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmIWX-0005dA-K8 for qemu-devel@nongnu.org; Wed, 14 Oct 2015 05:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmIWR-0007Xs-OV for qemu-devel@nongnu.org; Wed, 14 Oct 2015 05:39:05 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:37537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmIWR-0007XI-Hl for qemu-devel@nongnu.org; Wed, 14 Oct 2015 05:38:59 -0400 Received: by wijq8 with SMTP id q8so72467627wij.0 for ; Wed, 14 Oct 2015 02:38:59 -0700 (PDT) X-Received: by 10.180.11.165 with SMTP id r5mr3297215wib.43.1444815539003; Wed, 14 Oct 2015 02:38:59 -0700 (PDT) Received: from vader.pb.local ([62.217.45.26]) by smtp.gmail.com with ESMTPSA id xt1sm8845960wjb.32.2015.10.14.02.38.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Oct 2015 02:38:58 -0700 (PDT) From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Wed, 14 Oct 2015 11:38:24 +0200 Message-Id: <1444815506-30087-3-git-send-email-eduardo.otubo@profitbricks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444815506-30087-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1444815506-30087-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.181 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eduardo.otubo@profitbricks.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 ##########################################