From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmPpJ-000270-65 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 11:22:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmPpD-0007dD-V0 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 11:22:25 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:60159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmPpD-0007d9-OX for qemu-devel@nongnu.org; Thu, 06 Nov 2014 11:22:19 -0500 Received: by mail-wi0-f178.google.com with SMTP id bs8so2008600wib.11 for ; Thu, 06 Nov 2014 08:22:19 -0800 (PST) Date: Thu, 6 Nov 2014 17:22:15 +0100 From: Eduardo Otubo Message-ID: <20141106162214.GA8274@vader> References: <1415285358-7446-1-git-send-email-eduardo.otubo@profitbricks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] seccomp: change configure to avoid arm 32 to break List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paul Moore , QEMU Developers , Philipp Gesang On Thu, Nov 06, 2014 at 03:49:04PM +0000, Peter Maydell wrote: > On 6 November 2014 14:49, Eduardo Otubo wrote: > > Right now seccomp is breaking the compilation of Qemu on armv7l due > > to libsecomp current lack of support for this arch. This problem is > > already fixed on libseccomp upstream but no release date for that is > > scheduled to far. This patch disables support for seccomp on armv7l > > temporarily until libseccomp does a new release. Then I'll remove the > > hack and update libseccomp dependency on configure script. > > > > Related bug: https://bugs.launchpad.net/qemu/+bug/1363641 > > > > Signed-off-by: Eduardo Otubo > > --- > > configure | 20 +++++++++++--------- > > 1 file changed, 11 insertions(+), 9 deletions(-) > > > > diff --git a/configure b/configure > > index 2f17bf3..16fd7f5 100755 > > --- a/configure > > +++ b/configure > > @@ -1823,15 +1823,17 @@ fi > > # libseccomp check > > > > if test "$seccomp" != "no" ; then > > - if $pkg_config --atleast-version=2.1.0 libseccomp; then > > - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" > > - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" > > - seccomp="yes" > > - else > > - if test "$seccomp" = "yes"; then > > - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" > > - fi > > - seccomp="no" > > + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then > > + if $pkg_config --atleast-version=2.1.0 libseccomp; then > > + libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" > > + QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" > > + seccomp="yes" > > + else > > + if test "$seccomp" = "yes"; then > > + feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" > > + fi > > + seccomp="no" > > + fi > > fi > > This is missing the logic for turning "" into "no" or printing the > feature_not_found message if the probe failed because of the CPU > being wrong. The easiest fix for that is just to roll the whole check > into one if: > if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && > $pkg_config --atleast-version=2.1.0 libseccomp; then > Yep, I think that does make a lot of sense looking from the perspective of feature_not_found. I'll just roll out a v3 if you don't mind (I guess this was supposed to be the v2) Thanks for the review, -- Eduardo Otubo ProfitBricks GmbH