Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: B29882@freescale.com, Julian Pidancet <julian.pidancet@gmail.com>
Subject: Re: [PATCH v2] Introduce multiarch DISTRO_FEATURE
Date: Thu, 24 Nov 2011 17:51:40 +0000	[thread overview]
Message-ID: <1322157100.10928.11.camel@ted> (raw)
In-Reply-To: <20111124173621.GB28572@sakrah.homelinux.org>

On Thu, 2011-11-24 at 09:36 -0800, Khem Raj wrote:
> On (24/11/11 12:44), Julian Pidancet wrote:
> > >> +def get_gcc_multiarch_setting(bb, d):
> > >> +    if 'multiarch' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
> > >> +        if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'i586', 'i686' ] :
> > >> +            return "--enable-targets=all"
> > >> +        if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'powerpc' ] :
> > >> +            return "--enable-targets=powerpc64"
> > >> +        if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'sparc' ] :
> > >> +            return "--enable-targets=all"
> > >> +    return ""
> 
> looking at above function can this be made into a single if statement
> instead of 3

Julian: Could you update this to use the syntax d.getVar instead of
bb.data.getVar(..., d) please? We recently did a fairly big cleanup of
these and I'd rather not see it creep back in! We also prefer "True"
instead of "1" although we've not done a big cleanup on that yet (its
planned).

As Khem mentioned, we can probably get this down to a couple of getVar
calls instead of the above too!

Cheers,

Richard






  reply	other threads:[~2011-11-24 17:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16  1:01 [PATCH v2] Introduce multiarch DISTRO_FEATURE Julian Pidancet
2011-11-23 16:39 ` Julian Pidancet
2011-11-23 16:47   ` Richard Purdie
2011-11-23 17:28     ` Julian Pidancet
2011-11-24  3:32 ` Khem Raj
2011-11-24 12:44   ` Julian Pidancet
2011-11-24 17:36     ` Khem Raj
2011-11-24 17:51       ` Richard Purdie [this message]
2011-11-24 22:38       ` Julian Pidancet

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=1322157100.10928.11.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=B29882@freescale.com \
    --cc=julian.pidancet@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