Patchwork qa.py: Toolchain path should not be hardcoded to execute objdump

login
register
mail settings
Submitter Shakeel, Muhammad
Date Dec. 4, 2012, 10:40 a.m.
Message ID <1354617659-30238-1-git-send-email-muhammad_shakeel@mentor.com>
Download mbox | patch
Permalink /patch/40241/
State Accepted
Commit ef05a7fe17690e0f1557071f230593a66148d7dd
Headers show

Comments

Shakeel, Muhammad - Dec. 4, 2012, 10:40 a.m.
From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

Currently objdump command is invoked from the STAGING_BINDIR_TOOLCHAIN
directory. In case of external toolchain if this directory doesn't
exist then objdump fails to execute. Instead of hardcoding the path
it should search PATH to find it.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 meta/lib/oe/qa.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index 2c51141..d9848c8 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -97,14 +97,14 @@  class ELFFile:
             return self.objdump_output[cmd]
 
         objdump = d.getVar('OBJDUMP', True)
-        staging_dir = d.getVar('STAGING_BINDIR_TOOLCHAIN', True)
 
         env = os.environ.copy()
         env["LC_ALL"] = "C"
+        env["PATH"] = d.getVar('PATH', True)
 
         try:
             bb.note("%s %s %s" % (objdump, cmd, self.name))
-            self.objdump_output[cmd] = bb.process.run([ os.path.join(staging_dir, objdump), cmd, self.name ], env=env, shell=False)[0]
+            self.objdump_output[cmd] = bb.process.run([objdump, cmd, self.name], env=env, shell=False)[0]
             return self.objdump_output[cmd]
         except Exception, e:
             bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))