Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E683BC433E0 for ; Fri, 22 May 2020 11:20:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4CFD2065C for ; Fri, 22 May 2020 11:20:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4CFD2065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jc5iP-0000Bb-Ol; Fri, 22 May 2020 11:19:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jc5iO-0000BW-Bl for xen-devel@lists.xenproject.org; Fri, 22 May 2020 11:19:48 +0000 X-Inumbo-ID: 24f6bd45-9c1e-11ea-abb2-12813bfff9fa Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 24f6bd45-9c1e-11ea-abb2-12813bfff9fa; Fri, 22 May 2020 11:19:47 +0000 (UTC) Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 827xNiK5/8ob4m5UXYy49GyQHOI+OOajdsyGOfrpNNOw+xD7Da6ppFGieENMyiTEC5vQevqbtq F6OlV5OqrVzO9bUf1a7DEhyF3MxhNH0LDJqU0voMxjQxVoBu+oA1/8m2iOVXZ24KU2AWH1q6Dc ZRW1v9MXlsQ3IO+bxOgM2yRTF56PiFfH/YBa+yIGIukFNZiMgpjM1G7JCEYECaVvpDNw605dlV nmlvcvK50NjsrLjlOTaWRkMzQnoMJhnS/mVzeHIzezt9ZJ1kTo8U4GyswtLIspg47fdjJ9sgHi gkc= X-SBRS: 2.7 X-MesageID: 18452004 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,421,1583211600"; d="scan'208";a="18452004" Date: Fri, 22 May 2020 13:19:40 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Wei Liu Subject: Re: [PATCH 2/3] configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS Message-ID: <20200522111940.GB54375@Air-de-Roger> References: <20200505092454.9161-1-roger.pau@citrix.com> <20200505092454.9161-3-roger.pau@citrix.com> <20200522090553.eegs4fcltfqjuhzo@debian> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200522090553.eegs4fcltfqjuhzo@debian> X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel , nd , Ian Jackson , Bertrand Marquis Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Fri, May 22, 2020 at 10:05:53AM +0100, Wei Liu wrote: > On Fri, May 22, 2020 at 08:41:17AM +0000, Bertrand Marquis wrote: > > Hi, > > > > As a consequence of this fix, the following has been committed (I guess as a consequence of regenerating the configure scripts): > > diff --git a/tools/configure b/tools/configure > > index 375430df3f..36596389b8 100755 > > --- a/tools/configure > > +++ b/tools/configure > > @@ -4678,6 +4678,10 @@ for ldflag in $APPEND_LIB > > do > > APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag" > > done > > +if ! -z $EXTRA_PREFIX ; then > > + CPPFLAGS="$CPPFLAGS -I$EXTRA_PREFIX/include" > > + LDFLAGS="$LDFLAGS -L$EXTRA_PREFIX/lib" > > +fi > > CPPFLAGS="$PREPEND_CPPFLAGS $CPPFLAGS $APPEND_CPPFLAGS" > > LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS” > > > > This should be: > > if [ ! -z $EXTRA_PREFIX ]; then > > > > As on other configure scripts. > > > > During configure I have not the following error: > > ./configure: line 4681: -z: command not found > > > > Which is ignored but is adding -L/lib and -I/include to the CPPFLAGS and LDFLAGS > > > > What should be the procedure to actually fix that (as the problem is coming from the configure script regeneration I guess) ? > > Does the following patch work for you? > > diff --git a/m4/set_cflags_ldflags.m4 b/m4/set_cflags_ldflags.m4 > index 08f5c983cc63..cd34c139bc94 100644 > --- a/m4/set_cflags_ldflags.m4 > +++ b/m4/set_cflags_ldflags.m4 > @@ -15,7 +15,7 @@ for ldflag in $APPEND_LIB > do > APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag" > done > -if [ ! -z $EXTRA_PREFIX ]; then > +if test ! -z $EXTRA_PREFIX ; then > CPPFLAGS="$CPPFLAGS -I$EXTRA_PREFIX/include" > LDFLAGS="$LDFLAGS -L$EXTRA_PREFIX/lib" > fi Reviewed-by: Roger Pau Monné My bad, I assume [] is expanded by m4, as that seems to be part of the language? Thanks, Roger.