mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-10 18:05:28 +02:00
oe.external: move common functions here
Also provide external-common.bbclass to wrap its inclusion and setup associated metadata. This will make easier to search sysroots for files without pulling in the rest of the external toolchain class. Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
30
classes/external-common.bbclass
Normal file
30
classes/external-common.bbclass
Normal file
@@ -0,0 +1,30 @@
|
||||
OE_IMPORTS += "oe.external"
|
||||
|
||||
EXTERNAL_TOOLCHAIN_SYSROOT ?= "${@oe.external.run(d, 'gcc', *(TARGET_CC_ARCH.split() + ['-print-sysroot'])).rstrip()}"
|
||||
EXTERNAL_TOOLCHAIN_LIBROOT ?= "${@oe.external.run(d, 'gcc', *(TARGET_CC_ARCH.split() + ['-print-file-name=crtbegin.o'])).rstrip().replace('/crtbegin.o', '')}"
|
||||
|
||||
EXTERNAL_INSTALL_SOURCE_PATHS = "\
|
||||
${EXTERNAL_TOOLCHAIN_SYSROOT} \
|
||||
${EXTERNAL_TOOLCHAIN}/${EXTERNAL_TARGET_SYS} \
|
||||
${EXTERNAL_TOOLCHAIN_SYSROOT}/.. \
|
||||
${EXTERNAL_TOOLCHAIN} \
|
||||
${D} \
|
||||
"
|
||||
|
||||
# Potential locations within the external toolchain sysroot
|
||||
FILES_MIRRORS = "\
|
||||
${bindir}/|/usr/${baselib}/bin/\n \
|
||||
${base_libdir}/|/usr/${baselib}/\n \
|
||||
${libexecdir}/|/usr/libexec/\n \
|
||||
${libexecdir}/|/usr/${baselib}/${PN}\n \
|
||||
${mandir}/|/usr/share/man/\n \
|
||||
${mandir}/|/usr/man/\n \
|
||||
${mandir}/|/man/\n \
|
||||
${mandir}/|/share/doc/*-${EXTERNAL_TARGET_SYS}/man/\n \
|
||||
${prefix}/|${base_prefix}/\n \
|
||||
"
|
||||
|
||||
def external_run(d, *args):
|
||||
"""Convenience wrapper"""
|
||||
oe_import(d)
|
||||
return oe.external.run(d, *args)
|
||||
Reference in New Issue
Block a user