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: 54985 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 4751722FFA for ; Thu, 15 Oct 2015 08:01:49 +0000 (UTC) Received: by lbbms9 with SMTP id ms9sf6186828lbb.3 for ; Thu, 15 Oct 2015 01:01:48 -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=eHk/tee0FKo39EtDzRMfqlnuNRaMaXkYXeZLBFJbehWUIfVHYIh/wvRvq0SQJcv5dG OxM4rP+xUAG15Ru8xhcKfDG4OdtFuWzGE4xEhvjj/YMMMLyrp/Eft87rVd83P1WqI6uj R3UBlKCb6wHVp/akjX4VSMagJOUgX/6lxfaD81EJ1jX74UKu+HohRnM57Er1jg3W/SCy fPF0VaU0LUzFngMnyAwZfKba6aUV5NThy+SQAKtiWuVTdEw05yv2oqC+xzgtX0nb5sjj ClR6WYWzzFgS4JkrYiZCBsRp8Zrj8dil8fndUtwsY/UfZeSTetbQDPPVLEatO9EVvsJ9 EKvw== X-Gm-Message-State: ALoCoQnA4fw5It2qPyesV8XeQ/BjhSaoK1GLMVB3/hWS3oaofwHSEYp/To9FafK34t3kvrMqb/lz X-Received: by 10.180.9.104 with SMTP id y8mr6547688wia.7.1444896108219; Thu, 15 Oct 2015 01:01:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.79.85 with SMTP id d82ls110823lfb.47.gmail; Thu, 15 Oct 2015 01:01:48 -0700 (PDT) X-Received: by 10.112.61.226 with SMTP id t2mr3746854lbr.11.1444896108062; Thu, 15 Oct 2015 01:01:48 -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 ps9si8283939lbb.163.2015.10.15.01.01.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 01:01:48 -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 lbwr8 with SMTP id r8so62853295lbw.2 for ; Thu, 15 Oct 2015 01:01:47 -0700 (PDT) X-Received: by 10.112.161.168 with SMTP id xt8mr2717993lbb.88.1444896107893; Thu, 15 Oct 2015 01:01:47 -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 w3csp463784lbq; Thu, 15 Oct 2015 01:01:46 -0700 (PDT) X-Received: by 10.140.92.56 with SMTP id a53mr9933820qge.54.1444896106777; Thu, 15 Oct 2015 01:01:46 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g7si11828492qkh.75.2015.10.15.01.01.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 15 Oct 2015 01:01:46 -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]:46362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmdTu-0005Pb-43 for patch@linaro.org; Thu, 15 Oct 2015 04:01:46 -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-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+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 ##########################################