meta: Add TCOVERRIDE for toolchain selection at recipe scope

TCOVERRIDE is defined to toolchain-<TOOLCHAIN> and its added to OVERRIDES
that a recipe can see and it can use "toolchain-gcc" or "toolchain-clang"
to set specific metadata based upon global distro toolchain policy.

(From OE-Core rev: 6010f47124d9067609bbe5d9ff16193c8bf79acf)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2025-05-22 20:52:47 -07:00 committed by Richard Purdie
parent a7b3f80b1b
commit b34d2ad567
3 changed files with 4 additions and 1 deletions

View File

@ -801,7 +801,7 @@ DISTRO_NAME ??= "OpenEmbedded"
# And finally '<foo>:forcevariable' overrides any standard variable, with the highest priority. # And finally '<foo>:forcevariable' overrides any standard variable, with the highest priority.
# This works for functions as well, they are really just variables. # This works for functions as well, they are really just variables.
# #
OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:layer-${FILE_LAYERNAME}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable" OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:layer-${FILE_LAYERNAME}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:${TCOVERRIDE}${LIBCOVERRIDE}:forcevariable"
FILE_LAYERNAME ??= "config" FILE_LAYERNAME ??= "config"
LIBCOVERRIDE ?= "" LIBCOVERRIDE ?= ""
CLASSOVERRIDE ?= "class-target" CLASSOVERRIDE ?= "class-target"

View File

@ -30,3 +30,5 @@ TUNE_CCARGS += "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-pre
LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2"
LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1"
TCOVERRIDE = "toolchain-clang"

View File

@ -24,3 +24,4 @@ PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime"
TCOVERRIDE = "toolchain-gcc"