All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Fix random python backtrace in mutlilib handling code.
@ 2016-08-01 16:02 Jeremy Puhlman
  2016-08-01 16:02 ` [PATCH 2/2] Set READELF for cross compilation Jeremy Puhlman
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Puhlman @ 2016-08-01 16:02 UTC (permalink / raw)
  To: openembedded-core

newval is not defined in all cases. Set to None and check if it is set.

  File
"/local/foo/builds/x86/layers/openembedded-core/meta/classes/multilib_global.bbclass",
line 90, in preferred_ml_updates(d=<bb.data_smart.DataSmart object at
0xf6fd528c>):
                 if not d.getVar(newname, False):
    >                d.setVar(newname, localdata.expand(newval))
             # Avoid future variable key expansion
UnboundLocalError: local variable 'newval' referenced before assignment

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
 meta/classes/multilib_global.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index 67dc72b..11ae268 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -72,6 +72,7 @@ def preferred_ml_updates(d):
             pkg = pkg.replace("virtual/", "")
             virt = "virtual/"
         for p in prefixes:
+            newval = None
             if pkg != "kernel":
                 newval = p + "-" + val
 
@@ -86,7 +87,7 @@ def preferred_ml_updates(d):
 
             # implement alternative multilib name
             newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
-            if not d.getVar(newname, False):
+            if not d.getVar(newname, False) and newval != None:
                 d.setVar(newname, localdata.expand(newval))
         # Avoid future variable key expansion
         provexp = d.expand(prov)
-- 
2.6.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] Set READELF for cross compilation
  2016-08-01 16:02 [PATCH 1/2] Fix random python backtrace in mutlilib handling code Jeremy Puhlman
@ 2016-08-01 16:02 ` Jeremy Puhlman
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Puhlman @ 2016-08-01 16:02 UTC (permalink / raw)
  To: openembedded-core

In the case of using an external toolchain that supports multilib
compilation with a single binary, TARGET_PREFIX is the same for both main
and multilib abis. Without READELF exported, python3 assumes it is
either the readelf for ${BUILD_SYS}-readelf. Exporting cross readelf
fixes the build issue.

checking LDLIBRARY... libpython$(LDVERSION).so
checking for i586-montavistamllib32-linux-ranlib...
x86_64-montavista-linux-ranlib
checking for i586-montavistamllib32-linux-ar...
x86_64-montavista-linux-ar
checking for i586-montavistamllib32-linux-readelf... no
checking for readelf... readelf
configure: WARNING: using cross tools not prefixed with host triplet

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
 meta/conf/bitbake.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index af3b181..9bf9bbb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -471,6 +471,7 @@ export OBJCOPY = "${HOST_PREFIX}objcopy"
 export OBJDUMP = "${HOST_PREFIX}objdump"
 export STRINGS = "${HOST_PREFIX}strings"
 export NM = "${HOST_PREFIX}nm"
+export READELF = "${HOST_PREFIX}readelf"
 PYTHON = "${@sys.executable}"
 
 export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
-- 
2.6.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-01 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01 16:02 [PATCH 1/2] Fix random python backtrace in mutlilib handling code Jeremy Puhlman
2016-08-01 16:02 ` [PATCH 2/2] Set READELF for cross compilation Jeremy Puhlman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.