mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-06 07:54:37 +02:00
external-sourcery: ensure the sysroot is available as a variable again
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
@@ -63,10 +63,17 @@ python toolchain_metadata_setup () {
|
||||
if not isinstance(e, bb.event.ConfigParsed):
|
||||
return
|
||||
|
||||
import subprocess
|
||||
d = e.data
|
||||
|
||||
l = d.createCopy()
|
||||
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()
|
||||
d.setVar('EXTERNAL_TOOLCHAIN_SYSROOT', toolchain_sysroot)
|
||||
|
||||
if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
|
||||
d.setVar('TOOLCHAIN_PATH_ADD', '')
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ SRC_URI = "file://SUPPORTED"
|
||||
|
||||
do_install() {
|
||||
# Use optimized files if available
|
||||
sysroot="$(${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-sysroot)"
|
||||
sysroot="${EXTERNAL_TOOLCHAIN_SYSROOT}"
|
||||
|
||||
cp -a $sysroot${base_libdir}/. ${D}${base_libdir}
|
||||
cp -a $sysroot/etc/. ${D}${sysconfdir}
|
||||
|
||||
Reference in New Issue
Block a user