poky/meta/classes-global
Richard Purdie 5317a214c5 toolchain: Provide abstraction for recipe specific toolchain selection
This change implements a toolchain selection mechanism. Selection is
made using a set of variables, primarily PREFERRED_TOOLCHAIN_TARGET which
defaults to gcc.

It uses the familiar name for toolchain e.g. "gcc" which selects GNU
compiler + binutils as default C/C++ toolchain or "clang" which will
use LLVM/Clang Compiler. Layers an add their own toolchain definitions
too.

There are also PREFERRED_TOOLCHAIN_NATIVE and PREFERRED_TOOLCHAIN_SDK
which will ulitmately allow selection of the toolchain used for the
native/cross and nativesdk/crosssdk compilers. This currently isn't
functional but is essential to the patch to ensure things are set
to the existing gcc support in those cases.

Users would most commonly want to set:

PREFERRED_TOOLCHAIN_TARGET ?= "clang"

in local.conf or other distro specific global configuration metadata.

It is also selectable at recipe scope, since not all packages are
buildable with either clang or gcc, a recipe can explicitly require
a given toolchain using the TOOLCAHIN variable, e.g. glibc can not
be built with clang therefore glibc recipe sets:

TOOLCHAIN = "gcc"

The TOOLCHAIN variable is distinct from the user preference so recipes
with specific requirements can be identified. This also allows different
polcies to be be specified for native/SDK cases in the future.

(From OE-Core rev: 45bdedd213aff8df3214b95ef2a8551c0abd93a0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 22:26:38 +01:00
..
base.bbclass toolchain: Provide abstraction for recipe specific toolchain selection 2025-06-16 22:26:38 +01:00
buildstats.bbclass buildstats: Avoid rare UnboundLocalError 2025-03-03 18:01:29 +00:00
debian.bbclass package/package_write: Improve packagedata code location 2023-11-08 10:56:35 +00:00
devshell.bbclass devshell: Do not add scripts/git-intercept to PATH 2023-02-10 09:25:44 +00:00
insane.bbclass insane: Fix debug-deps check 2025-06-16 17:57:29 +01:00
license.bbclass bitbake.conf/pseudo: Switch from exclusion list to inclusion list 2025-05-12 22:01:56 +01:00
logging.bbclass classes/logging: Added the bbverbnote command to the logging set 2025-01-20 13:38:59 +00:00
mirrors.bbclass mirrors: rationalise Debian mirrors 2025-03-06 11:16:46 +00:00
package_deb.bbclass package/package_write: Improve packagedata code location 2023-11-08 10:56:35 +00:00
package_ipk.bbclass package_ipk: Use preferred form of --force-postinstall 2025-02-11 11:44:19 +00:00
package_pkgdata.bbclass
package_rpm.bbclass package_rpm: set a timestamp handling policy with the new macro %build_mtime_policy 2025-01-04 12:34:04 +00:00
package.bbclass lib/package: Check incompatible licenses at packaging time 2024-10-25 15:37:10 +01:00
packagedata.bbclass
patch.bbclass patch.bbclass: Make use of oe.patch.GitApplyTree.commitIgnored() 2024-02-19 16:03:22 +00:00
retain.bbclass classes: add new retain class for retaining build results 2024-08-03 07:56:10 +01:00
sanity.bbclass bitbake.conf/pseudo: Switch from exclusion list to inclusion list 2025-05-12 22:01:56 +01:00
sstate.bbclass bitbake.conf/pseudo: Switch from exclusion list to inclusion list 2025-05-12 22:01:56 +01:00
staging.bbclass classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and c++/binutils) 2025-01-21 23:09:33 +00:00
uninative.bbclass uninative: show errors if installing fails 2025-04-29 09:55:32 +01:00
utility-tasks.bbclass classes/utility-tasks: port do_listtasks to use bb.build.listtasks 2024-12-12 13:31:27 +00:00
utils.bbclass kernel-yocto: make kernel commits reproducible 2025-01-21 13:26:07 +00:00
yocto-check-layer.bbclass classes/yocto-check-layer: add check for tasks that allow network access 2025-05-05 17:22:11 +01:00