diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 1494cd4..dd4ff39 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -48,6 +48,10 @@ ENABLE_BINARY_LOCALE_GENERATION = "" TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}" +CSL_IS_PRO := "${@'1' if os.path.exists('${EXTERNAL_TOOLCHAIN}/license') else '0'}" + +TUNE_CCARGS_append_x86 = "${@'-msgxx-glibc' if CSL_IS_PRO == '1' else ''}" + # Unfortunately, the CSL ia32 toolchain has non-prefixed binaries in its # bindir (e.g. gcc, ld). To avoid this messing up our build, we avoid adding # this bindir to our PATH, and instead add symlinks to the prefixed binaries @@ -76,10 +80,6 @@ python toolchain_metadata_setup () { if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)): d.setVar('TOOLCHAIN_PATH_ADD', '') - if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/license', l)): - # Assuming use of a CodeBench Pro toolchain - d.setVar('TUNE_CCARGS_append_x86', " -msgxx-glibc") - # The external toolchain may not have been built with the yocto preferred # gnu hash setting, so ensure that the corresponding sanity check is a # warning, not an error.