diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 3514e9a..d15f1b3 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -155,4 +155,16 @@ def populate_toolchain_links(d): require conf/distro/include/csl-versions.inc +def get_gcc_version_prefix(d): + ver = d.getVar('CSL_VER_GCC', True) + if ver: + components = ver.split('.') + if len(components) > 1: + return '.'.join(components[:2]) + else: + return '4.7%' + +# Prefer a matching gcc version +GCCVERSION ?= "${@get_gcc_version_prefix(d)}%" + BUILDCFG_VARS += "CSL_VER_MAIN EXTERNAL_TOOLCHAIN"