Skip to content

Commit 2a223aa

Browse files
krajrpurdie
authored andcommitted
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. Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent 0eed042 commit 2a223aa

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

meta/conf/bitbake.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ DISTRO_NAME ??= "OpenEmbedded"
801801
# And finally '<foo>:forcevariable' overrides any standard variable, with the highest priority.
802802
# This works for functions as well, they are really just variables.
803803
#
804-
OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:layer-${FILE_LAYERNAME}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable"
804+
OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:layer-${FILE_LAYERNAME}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:${TCOVERRIDE}${LIBCOVERRIDE}:forcevariable"
805805
FILE_LAYERNAME ??= "config"
806806
LIBCOVERRIDE ?= ""
807807
CLASSOVERRIDE ?= "class-target"

meta/conf/toolchain/clang.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ TUNE_CCARGS += "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-pre
3030

3131
LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2"
3232
LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1"
33+
34+
TCOVERRIDE = "toolchain-clang"

meta/conf/toolchain/gcc.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}"
2424
PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}"
2525
PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime"
2626

27+
TCOVERRIDE = "toolchain-gcc"

0 commit comments

Comments
 (0)