Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Andre McCurdy <armccurdy@gmail.com>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/3] uclibc.inc: avoid immediate expansion for UCLIBC_EXTRA_CFLAGS
Date: Fri, 07 Aug 2015 05:56:16 -0500	[thread overview]
Message-ID: <1438944976.30467.30.camel@linuxfoundation.org> (raw)
In-Reply-To: <CAJ86T=VLSdzHw5aCo=eHM=OK+uia9hPxKdf2uRNi6NmVspocaA@mail.gmail.com>

On Thu, 2015-08-06 at 18:14 -0700, Andre McCurdy wrote:
> On Thu, Aug 6, 2015 at 4:02 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Thu, 2015-08-06 at 12:41 -0700, Andre McCurdy wrote:
> >> If immediate variable expansion is used, then UCLIBC_EXTRA_CFLAGS can
> >> sometimes be derived from a partially expanded value of CFLAGS.
> >>
> >> One specific problem case occurs when security_flags.inc is used: CFLAGS
> >> is evaluated before the SECURITY_CFLAGS_pn-uclibc over-ride has been
> >> applied and therefore UCLIBC_EXTRA_CFLAGS ends up being based on the
> >> default SECURITY_CFLAGS instead of the uclibc specific value.
> >>
> >> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> >> ---
> >>  meta/recipes-core/uclibc/uclibc.inc | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
> >> index c483228..3ed8b60 100644
> >> --- a/meta/recipes-core/uclibc/uclibc.inc
> >> +++ b/meta/recipes-core/uclibc/uclibc.inc
> >> @@ -57,8 +57,8 @@ export V="2"
> >>  # -O<n> -fno-omit-frame-pointer ends up with GCC ICE on thumb as reported
> >>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44860
> >>  #
> >> -CFLAGS_arm := "${@oe_filter_out('-fno-omit-frame-pointer', '${CFLAGS}', d)}"
> >> -UCLIBC_EXTRA_CFLAGS  := "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
> >> +CFLAGS_arm = "${@oe_filter_out('-fno-omit-frame-pointer', '${CFLAGS}', d)}"
> >
> > I'm rather surprised we don't get circular references without the :=
> > operator with this. I suspect we can see build failures if you change
> > the code like this. That said, I've been meaning to go through and
> > replace all the uses of oe_filter_out with the remove operator. Can we
> > do that here please instead?
> >
> > E.g:
> > CFLAGS_remove_arm = "-fno-omit-frame-pointer"
> 
> OK, new patch on the way.
> 
> >> +UCLIBC_EXTRA_CFLAGS = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
> 
> Is it OK to keep using oe_filter_out() here to support the regex?

Yes, the regex is obviously trickier with _remove so I think that one is
a fair use of oe_filter_out(). Thanks for the updated patches, just need
to answer Khem's question, it sounds like LDFLAGS may be used somehow
but I've not looked at the code as yet.

Cheers,

Richard



      reply	other threads:[~2015-08-07 10:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 19:41 [PATCH 0/3] fix uclibc build with security_flags.inc Andre McCurdy
2015-08-06 19:41 ` [PATCH 1/3] uclibc.inc: remove unused UCLIBC_EXTRA_LDFLAGS Andre McCurdy
2015-08-06 19:41 ` [PATCH 2/3] security_flags.inc: clear SECURITY_CFLAGS for uclibc Andre McCurdy
2015-08-07  2:02   ` Khem Raj
2015-08-07 19:01     ` Andre McCurdy
2015-08-06 19:41 ` [PATCH 3/3] uclibc.inc: avoid immediate expansion for UCLIBC_EXTRA_CFLAGS Andre McCurdy
2015-08-06 23:02   ` Richard Purdie
2015-08-07  1:14     ` Andre McCurdy
2015-08-07 10:56       ` Richard Purdie [this message]

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=1438944976.30467.30.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.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