diff options
author | Khem Raj <raj.khem@gmail.com> | 2025-05-22 20:52:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-09 17:43:42 +0100 |
commit | b34d2ad567fd9070020b13e0749b9976db57cc8d (patch) | |
tree | d5b8592aa781b66309d1a146950e45517db3d3b8 | |
parent | a7b3f80b1bfe3361fc9e82e083268a9153e68570 (diff) | |
download | poky-b34d2ad567fd9070020b13e0749b9976db57cc8d.tar.gz |
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>
-rw-r--r-- | meta/conf/bitbake.conf | 2 | ||||
-rw-r--r-- | meta/conf/toolchain/clang.inc | 2 | ||||
-rw-r--r-- | meta/conf/toolchain/gcc.inc | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 52e74a6879..c515a07b6f 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -801,7 +801,7 @@ DISTRO_NAME ??= "OpenEmbedded" | |||
801 | # And finally '<foo>:forcevariable' overrides any standard variable, with the highest priority. | 801 | # And finally '<foo>:forcevariable' overrides any standard variable, with the highest priority. |
802 | # This works for functions as well, they are really just variables. | 802 | # This works for functions as well, they are really just variables. |
803 | # | 803 | # |
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" |
805 | FILE_LAYERNAME ??= "config" | 805 | FILE_LAYERNAME ??= "config" |
806 | LIBCOVERRIDE ?= "" | 806 | LIBCOVERRIDE ?= "" |
807 | CLASSOVERRIDE ?= "class-target" | 807 | CLASSOVERRIDE ?= "class-target" |
diff --git a/meta/conf/toolchain/clang.inc b/meta/conf/toolchain/clang.inc index 2bd4a07a86..fab94f0b14 100644 --- a/meta/conf/toolchain/clang.inc +++ b/meta/conf/toolchain/clang.inc | |||
@@ -30,3 +30,5 @@ TUNE_CCARGS += "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-pre | |||
30 | 30 | ||
31 | LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" | 31 | LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" |
32 | LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" | 32 | LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1" |
33 | |||
34 | TCOVERRIDE = "toolchain-clang" | ||
diff --git a/meta/conf/toolchain/gcc.inc b/meta/conf/toolchain/gcc.inc index 36d33f5d6d..75f9abe999 100644 --- a/meta/conf/toolchain/gcc.inc +++ b/meta/conf/toolchain/gcc.inc | |||
@@ -24,3 +24,4 @@ PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}" | |||
24 | PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" | 24 | PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" |
25 | PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" | 25 | PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" |
26 | 26 | ||
27 | TCOVERRIDE = "toolchain-gcc" | ||