mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-04 06:54:36 +02:00
tcmode-external-sourcery: CSL_TARGET_SYS may contain a list of triplets
The first mentioned toolchain triplet from the list is selected, if there is a correspondent compiler found in external toolchain path. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
This commit is contained in:
@@ -17,7 +17,16 @@ CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu"
|
||||
CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu"
|
||||
CSL_TARGET_SYS = "${TARGET_SYS}"
|
||||
|
||||
TARGET_PREFIX = "${CSL_TARGET_SYS}-"
|
||||
def csl_target_sys(d):
|
||||
toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN', True)
|
||||
|
||||
for triplet in d.getVar('CSL_TARGET_SYS', True).split():
|
||||
gcc = os.path.join(toolchain_path, 'bin', triplet + '-gcc')
|
||||
if os.path.exists(gcc):
|
||||
return triplet + '-'
|
||||
return ''
|
||||
|
||||
TARGET_PREFIX = "${@csl_target_sys(d)}"
|
||||
|
||||
PREFERRED_PROVIDER_linux-libc-headers = "external-sourcery-toolchain"
|
||||
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-sourcery-toolchain"
|
||||
|
||||
Reference in New Issue
Block a user