mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-04 06:54:36 +02:00
tcmode-external-sourcery: fix PATH for sysroot extraction
Also catches failures to run. Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
@@ -70,8 +70,12 @@ python toolchain_metadata_setup () {
|
||||
l.finalize()
|
||||
|
||||
sysroot_cmd = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-sysroot"
|
||||
toolchain_sysroot = bb.process.run(bb.data.expand(sysroot_cmd, l),
|
||||
stderr=subprocess.PIPE)[0].rstrip()
|
||||
try:
|
||||
toolchain_sysroot = bb.process.run(bb.data.expand(sysroot_cmd, l),
|
||||
stderr=subprocess.PIPE,
|
||||
env={"PATH": l.getVar('PATH', True)})[0].rstrip()
|
||||
except bb.process.CmdError as exc:
|
||||
bb.warn(str(exc))
|
||||
d.setVar('EXTERNAL_TOOLCHAIN_SYSROOT', toolchain_sysroot)
|
||||
|
||||
if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
|
||||
|
||||
Reference in New Issue
Block a user