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

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.

(From OE-Core rev: a3a0e29d5d796fdf6755503cc31e45199b79d756)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Muhammad Shakeel
2012-12-04 15:40:59 +05:00
committed by Richard Purdie
parent bec5c30e1c
commit ef05a7fe17

View File

@@ -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))