[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS


  • To: Wei Liu <wl@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 22 May 2020 13:19:40 +0200
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, nd <nd@xxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Fri, 22 May 2020 11:19:54 +0000
  • Ironport-sdr: 827xNiK5/8ob4m5UXYy49GyQHOI+OOajdsyGOfrpNNOw+xD7Da6ppFGieENMyiTEC5vQevqbtq F6OlV5OqrVzO9bUf1a7DEhyF3MxhNH0LDJqU0voMxjQxVoBu+oA1/8m2iOVXZ24KU2AWH1q6Dc ZRW1v9MXlsQ3IO+bxOgM2yRTF56PiFfH/YBa+yIGIukFNZiMgpjM1G7JCEYECaVvpDNw605dlV nmlvcvK50NjsrLjlOTaWRkMzQnoMJhnS/mVzeHIzezt9ZJ1kTo8U4GyswtLIspg47fdjJ9sgHi gkc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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é <roger.pau@xxxxxxxxxx>

My bad, I assume [] is expanded by m4, as that seems to be part of the
language?

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.