Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Kartik Mohta <kartikmohta@gmail.com>
Subject: Re: [PATCH] gcc-common: Don't use "is" for comparing strings, use "=="
Date: Mon, 09 Jul 2012 10:24:27 -0700	[thread overview]
Message-ID: <4FFB13CB.9010200@linux.intel.com> (raw)
In-Reply-To: <1341372067-24821-1-git-send-email-kartikmohta@gmail.com>

On 07/03/2012 08:21 PM, Kartik Mohta wrote:
> Needed because the equality check was failing here even though upon
> printing the LHS and RHS were the same.
> As per http://stackoverflow.com/a/2987975/64537, using "is" compares the
> memory addresses of the two objects which is not what we want here. We
> just want to compare the values.
>
> Signed-off-by: Kartik Mohta <kartikmohta@gmail.com>
> ---
>   meta/recipes-devtools/gcc/gcc-common.inc |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
> index 45828bb..0a9324a 100644
> --- a/meta/recipes-devtools/gcc/gcc-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-common.inc
> @@ -10,7 +10,7 @@ inherit autotools gettext
>   FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/gcc-${PV}"
>
>   def get_gcc_fpu_setting(bb, d):
> -    if d.getVar('ARMPKGSFX_EABI', True) is "hf" and  d.getVar('TRANSLATED_TARGET_ARCH', True) is "arm":
> +    if d.getVar('ARMPKGSFX_EABI', True) == "hf" and d.getVar('TRANSLATED_TARGET_ARCH', True) == "arm":
>           return "--with-float=hard"
>       if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
>           return "--with-float=soft"
>

Merged into OE-Core

Thanks
	Sau!



      parent reply	other threads:[~2012-07-09 17:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04  3:21 [PATCH] gcc-common: Don't use "is" for comparing strings, use "==" Kartik Mohta
2012-07-04  6:36 ` Khem Raj
2012-07-09 17:24 ` Saul Wold [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=4FFB13CB.9010200@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=kartikmohta@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