From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 39F5BC433E0 for ; Fri, 22 May 2020 09:59:26 +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 044BD20757 for ; Fri, 22 May 2020 09:59:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 044BD20757 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org 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 1jc4SP-0008I9-BQ; Fri, 22 May 2020 09:59:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jc4SO-0008Hw-J6 for xen-devel@lists.xenproject.org; Fri, 22 May 2020 09:59:12 +0000 X-Inumbo-ID: e2ae8094-9c12-11ea-b07b-bc764e2007e4 Received: from mail-wm1-f67.google.com (unknown [209.85.128.67]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e2ae8094-9c12-11ea-b07b-bc764e2007e4; Fri, 22 May 2020 09:59:11 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id w64so9212687wmg.4 for ; Fri, 22 May 2020 02:59:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=vo0TO+fBgnYreyEx5cxh9gkmxSN5jFGdN8I+8XzFfYI=; b=iIGKOzDxHOzfvjqBSfS7f1g77I29rHX+/lqD2XcBn+DS6xhR3Eri0L8FWg9g+TI1Qg 2ZdAyG+BtHTrU1oDhecBxLaJZqetzjyW/aevpQIbX46MsO+2eiPWV97gEDt0AM+TYs5L SmGjh7Y8KYg1KnX1gnbU367KOsRoySMkSAyxQ+idSUaq3a4H2ucOkKw2l/uR1WIU2Ljv JepXw7O1lTJU1BzYmsS4RNsmAgDXTkJuoYlkcP9Wit7VREaVfDiUPt0RFAsqSay226kR IItDq3QxUfaBus/JQvtGi2UY8HmdywErFBu2VTqcrNEE3FfsB1rfoPoe1TYB0PPY7sWU FqeQ== X-Gm-Message-State: AOAM533Xi+g+qwUVP8tDZov0ShD9k4SsUY73wumKBYkn2pUN5pv4UnCT Mv1A99ufddcTQB54Z+qDnkY= X-Google-Smtp-Source: ABdhPJxzB3s1XUsarnDILUCrUGdK5hh0Ixpcne2INW8jZxlWhT4w/lwbIsmMF/r6NtW/ae5cHPWQtg== X-Received: by 2002:a1c:96d8:: with SMTP id y207mr5676302wmd.167.1590141551119; Fri, 22 May 2020 02:59:11 -0700 (PDT) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id d15sm63318wrq.30.2020.05.22.02.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 02:59:10 -0700 (PDT) Date: Fri, 22 May 2020 09:59:09 +0000 From: Wei Liu To: Bertrand Marquis Subject: Re: [PATCH 2/3] configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS Message-ID: <20200522095909.h3qc3mhogocdvwas@liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net> References: <20200505092454.9161-1-roger.pau@citrix.com> <20200505092454.9161-3-roger.pau@citrix.com> <20200522090553.eegs4fcltfqjuhzo@debian> <9FBA46AA-9727-4AA9-A23D-B72F5AE9C35C@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9FBA46AA-9727-4AA9-A23D-B72F5AE9C35C@arm.com> User-Agent: NeoMutt/20180716 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 , Wei Liu , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Fri, May 22, 2020 at 09:37:51AM +0000, Bertrand Marquis wrote: > Hi, > > > On 22 May 2020, at 10:05, 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 > > > > > > You will need to run autogen.sh to regenerate tools/configure. > > > > Yes that works on my side and generate tools/configure using “test” > > But why are the [] being removed when generating tools/configure ? No idea why autoconf removed [] really. I think switching to test is better anyway since that's what is used throughout tools/configure. Wei.