toolchain selection in core

Richard Purdie

I was asked about getting official support for the TOOLCHAIN variable
in core. This is obviously late in the release cycle and after a bit of
thought, the answer is no. I wanted to document why since I was forced
into thinking this through.

As background, meta-clang uses TOOLCHAIN internally to select between
toolchains. In itself that is good but the variable names used in that
layer don't scale well to core where they could be confused with other
things. For RUNTIME, I think Khem and I agree TCCXX_RUNTIME is better.

Specifically with TOOLCHAIN, the issue is that it doesn't scale.

Imagine we have random-si-vendor-cc (rsvcc), clang and gcc.

I can set TOOLCHAIN = "gcc" since a recipe might not build with rsvcc
but that stops it building with clang too.

markup for recipes and a way to then select a toolchain based on some
priority list (e.g. clang first, gcc as a fallback).

I appreciate the desire to add the markup but we need to do this in a
way which scales.

As such I'm not rushing into making TOOLCHAIN a "standard" as I don't
think it will work beyond clang. I notice we do have a couple of cases
that have crept into core which should really be removed.