Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2, 1/1] package/brltty: fix build with expat
Date: Fri, 18 Oct 2019 10:15:04 +0200	[thread overview]
Message-ID: <20191018101504.32d29c59@windsurf> (raw)
In-Reply-To: <20191017182213.GI14656@scaer>

On Thu, 17 Oct 2019 20:22:13 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> >    for variable in CC CFLAGS CXX CXXFLAGS LDFLAGS LDLIBS
> >    do
> >       unset "${variable}"
> >       variableForBuild="${variable}_FOR_BUILD"
> >       eval test '"${'"${variableForBuild}"'+set}"' != "set" || eval "${variable}"'="${'"${variableForBuild}"'}"'
> >    done
> > 
> >    "${sourceRoot}/configure" \
> >       --disable-api \
> >       --disable-gpm \
> >       --disable-iconv \
> >       --disable-icu \
> > 
> > The issue is that for some reason the magic "eval" stuff doesn't do its
> > job. Indeed, if I change the ${sourceRoot}/configure invocation to:
> > 
> >    CC=${CC_FOR_BUILD} \
> >    CFLAGS=${CFLAGS_FOR_BUILD} \
> >    CXX=${CXX_FOR_BUILD} \
> >    CXXFLAGS=${CXXFLAGS_FOR_BUILD} \
> >    LDFLAGS=${LDFLAGS_FOR_BUILD} \
> >    LDLIBS=${LDLIBS_FOR_BUILD} \
> >    "${sourceRoot}/configure" \
> >       --disable-api \
> >       --disable-gpm \  
> [--SNIP--]
> > Perhaps Yann can shed some light as to why the magic eval stuff doesn't
> > behave like it should.  
> 
> The difference I can spot is that in the first case, the 'unset' will
> cause the variables to be unset *and* unexported. Then the variables are
> (maybe) properly set by the eval, but they are not exported, and so are
> just not in the environment, and thus the sub-configure does not get
> them.

Ah, so:

	eval test '"${'"${variableForBuild}"'+set}"' != "set" || eval "${variable}"'="${'"${variableForBuild}"'}"'

should be changed to:

	eval test '"${'"${variableForBuild}"'+set}"' != "set" || eval export "${variable}"'="${'"${variableForBuild}"'}"'

 ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-10-18  8:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-13 12:45 [Buildroot] [PATCH v2,1/1] package/brltty: fix build with expat Fabrice Fontaine
2019-10-16 21:14 ` [Buildroot] [PATCH v2, 1/1] " Thomas Petazzoni
2019-10-17 18:22   ` Yann E. MORIN
2019-10-18  8:15     ` Thomas Petazzoni [this message]
2019-10-26 13:01   ` Thomas Petazzoni

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=20191018101504.32d29c59@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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