]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gcc-common: Don't use "is" for comparing strings, use "=="
authorKartik Mohta <kartikmohta@gmail.com>
Wed, 4 Jul 2012 03:21:07 +0000 (23:21 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jul 2012 15:51:21 +0000 (16:51 +0100)
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

index 45828bb5f54a6a349d5dfa58ec75c659f78cb6c8..0a9324aa3cf10d03c3851504f6fe21f2d9152b72 100644 (file)
@@ -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"