xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wl@xen.org>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, nd <nd@arm.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 2/3] configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS
Date: Fri, 22 May 2020 10:05:53 +0100	[thread overview]
Message-ID: <20200522090553.eegs4fcltfqjuhzo@debian> (raw)
In-Reply-To: <C053A44F-FFDE-4C07-B1FD-76FA8456ADCD@arm.com>

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.

Wei.

> 
> Bertrand
> 
> > On 5 May 2020, at 10:24, Roger Pau Monne <roger.pau@citrix.com> wrote:
> > 
> > The path provided by EXTRA_PREFIX should be added to the search path
> > of the configure script, like it's done in Config.mk. Not doing so
> > makes the search path for configure differ from the search path used
> > by the build.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > Please re-run autoconf.sh after applying.
> > ---
> > m4/set_cflags_ldflags.m4 | 4 ++++
> > 1 file changed, 4 insertions(+)
> > 
> > diff --git a/m4/set_cflags_ldflags.m4 b/m4/set_cflags_ldflags.m4
> > index cbad3c10b0..08f5c983cc 100644
> > --- a/m4/set_cflags_ldflags.m4
> > +++ b/m4/set_cflags_ldflags.m4
> > @@ -15,6 +15,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"])
> > 
> > -- 
> > 2.26.2
> > 
> > 
> 


  reply	other threads:[~2020-05-22  9:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  9:24 [PATCH 0/3] build: fixes for clang 10 Roger Pau Monne
2020-05-05  9:24 ` [PATCH 1/3] x86/mm: do not attempt to convert _PAGE_GNTTAB to a boolean Roger Pau Monne
2020-05-05 13:47   ` Jan Beulich
2020-05-05 14:11     ` Roger Pau Monné
2020-05-05 14:59       ` Jan Beulich
2020-05-05  9:24 ` [PATCH 2/3] configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS Roger Pau Monne
2020-05-06 13:07   ` Wei Liu
2020-05-22  8:41   ` Bertrand Marquis
2020-05-22  9:05     ` Wei Liu [this message]
2020-05-22  9:37       ` Bertrand Marquis
2020-05-22  9:59         ` Wei Liu
2020-05-22 11:19       ` Roger Pau Monné
2020-05-22 11:40         ` Bertrand Marquis
2020-05-22 11:41           ` Wei Liu
2020-05-05  9:24 ` [PATCH 3/3] tools/libxl: disable clang indentation check for the disk parser Roger Pau Monne
2020-05-06 13:07   ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522090553.eegs4fcltfqjuhzo@debian \
    --to=wl@xen.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=nd@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).