binutils.inc: Use anon python to grok CONFIGUREOPTS
authorKhem Raj <raj.khem@gmail.com>
Wed, 20 Oct 2010 21:45:13 +0000 (14:45 -0700)
committerKhem Raj <raj.khem@gmail.com>
Wed, 20 Oct 2010 21:48:24 +0000 (14:48 -0700)
* Immediate evaluation worked fine when the package was for target
  but failed for cross because cross bbclass is inherited after
  this evaluation happens and the configure parameters are pre
  evaluated which are incorrect for binutils-cross build, therefore
  we need to evaluate this expression at very end of parsing the recipe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/binutils/binutils.inc

index b90451f..0f086f3 100644 (file)
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
 SECTION = "devel"
 LICENSE = "GPL"
 
-INC_PR = "r11"
+INC_PR = "r12"
 
 COMPATIBLE_TARGET_SYS ?= "(?!nios2)"
 
@@ -42,7 +42,11 @@ B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
 
 EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
                --enable-shared"
-CONFIGUREOPTS := "${@oe_filter_out('--with-sysroot$', '${CONFIGUREOPTS}', d)}"
+python __anonymous () {
+       cfg = oe_filter_out('--with-sysroot$' , bb.data.getVar('CONFIGUREOPTS', d, 1) or "", d)
+       bb.data.setVar('CONFIGUREOPTS', cfg, d)
+}
+
 # This is necessary due to a bug in the binutils Makefiles
 EXTRA_OEMAKE = "configure-build-libiberty all"