From patchwork Fri Oct 30 13:44:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 538330 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 1F4B8140D7C for ; Sat, 31 Oct 2015 00:47:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=profitbricks_com.20150623.gappssmtp.com header.i=@profitbricks_com.20150623.gappssmtp.com header.b=udhb49JA; dkim-atps=neutral Received: from localhost ([::1]:50789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsA1W-0008Jr-Mi for incoming@patchwork.ozlabs.org; Fri, 30 Oct 2015 09:47:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs9zM-00058M-SC for qemu-devel@nongnu.org; Fri, 30 Oct 2015 09:45:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zs9zJ-0004cU-S0 for qemu-devel@nongnu.org; Fri, 30 Oct 2015 09:45:04 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:35829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs9zJ-0004cL-MC for qemu-devel@nongnu.org; Fri, 30 Oct 2015 09:45:01 -0400 Received: by wicll6 with SMTP id ll6so10981564wic.0 for ; Fri, 30 Oct 2015 06:45:01 -0700 (PDT) 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=l1hF7XIW4pnvYLF+xGGCzTDF7kbLhkgqE+SgRimasTs=; b=udhb49JANScYTI8GcbDUPK0pYoNynBJlzrYZnWweX+w6/H7pqF8NF8bJDz/PU7dEAV 6mxGChRZ/2OeXTFDHfdi5T+qeIjdPkMUzMtAzBV/u6ZKOZ4SkCbAuv7REusPj1mrg1zJ yZhR4gICtxi60JqHsS1iCx6wbzHwVCI/r4kO4tiY7q0rrtXB2R03Lqi+r2QVsb2ZQJnt rA8LsvleZnTHR8KLbwI3A+RRU369+8ACHEdtNmrxILOdBVGqoktqVXMlA15ikowrrQu9 RUked6RNFlITB3TpysNEwqYTll2NdVtaTbmKjuQoSH/61xb48Lcqi92ddJRh9lia/M1x A0RQ== 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=Cs6lGS5vFTEdyG81Ha5qJjE1+UQZDmqkUK46pE6JpD3gurVh+wcJ7pEyA0/Ec1kO/M 5Z/V1yCQpWICjIhR3XKBS0EX6f0WUNIsPZA5PEUgiB5Umy9zUR5ObOp1lSVzlpajt57r hdEEtThg+9QY+ygswA3VOzy8kG3oUmBO3jMVouQYFc0QRE6bTxr6g0kN/YJjM9DwKt2H K6nCSiBfzNxZS5Gmp0zziPZq1cIB+9GoFaq357InQm8mc9I3kJGOLm2cD3DenJ+c9pRE 7AtUWO2zZeiFJD6V6gKmRRGaHXl1E8GS+FK4WlbJXS8H4+TltObUr39EuNjxwfgo5JmA OhIQ== X-Gm-Message-State: ALoCoQkFinX4Nc47BmhgaZaPPv4/RTvaXfZucCB6JGtVYeKZ/drBGnwD04AYhmglGgJm2IhZky0W X-Received: by 10.194.205.162 with SMTP id lh2mr8444692wjc.61.1446212701170; Fri, 30 Oct 2015 06:45:01 -0700 (PDT) Received: from vader.pb.local ([62.217.45.26]) by smtp.gmail.com with ESMTPSA id gd10sm7121049wjb.47.2015.10.30.06.44.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Oct 2015 06:45:00 -0700 (PDT) From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Fri, 30 Oct 2015 14:44:47 +0100 Message-Id: <1446212690-7656-3-git-send-email-eduardo.otubo@profitbricks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446212690-7656-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1446212690-7656-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:c05::22b Cc: namnamc@safe-mail.net, peter.maydell@linaro.org, drjones@redhat.com, dann.frazier@canonical.com Subject: [Qemu-devel] [PULL 02/05] 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 ##########################################