From: Trevor Woerner <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 2/2] sdk: fold SDK_TOOLCHAIN_LANGS into SDK_FEATURES
Date: Thu, 6 Aug 2026 20:17:44 -0400 [thread overview]
Message-ID: <20260807001744.3874352-3-twoerner@gmail.com> (raw)
In-Reply-To: <20260807001744.3874352-1-twoerner@gmail.com>
Selecting the toolchain languages for an SDK is the same kind of choice
as selecting any other optional SDK content, so it does not need a list
of its own.
Make "go" and "rust" values of SDK_FEATURES and mark SDK_TOOLCHAIN_LANGS
as renamed so existing settings are reported rather than silently
ignored.
AI-Generated: codex/claude-opus 5 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v2:
- autobuilder.conf keeps += rather than switching to :append
---
meta/classes-recipe/populate_sdk_base.bbclass | 21 +++++++++----------
meta/conf/bitbake.conf | 1 +
.../yocto-autobuilder/autobuilder.conf | 2 +-
.../packagegroups/packagegroup-core-sdk.bb | 2 +-
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index aea4226ec33e..b2e6f1cae9eb 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -59,27 +59,26 @@ B:task-populate-sdk = "${SDK_DIR}"
SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
-SDK_TOOLCHAIN_LANGS ??= ""
-SDK_TOOLCHAIN_LANGS:remove:sdkmingw32 = "rust"
+SDK_FEATURES:remove:sdkmingw32 = "rust"
# libstd-rs doesn't build for mips n32 with compiler constraint errors
-SDK_TOOLCHAIN_LANGS:remove:mipsarchn32 = "rust"
+SDK_FEATURES:remove:mipsarchn32 = "rust"
# go will not build for x86-x32 or mingw
-SDK_TOOLCHAIN_LANGS:remove:linux-gnux32 = "go"
-SDK_TOOLCHAIN_LANGS:remove:riscv32 = "go"
-SDK_TOOLCHAIN_LANGS:remove:sdkmingw32 = "go"
-SDK_TOOLCHAIN_LANGS:remove:powerpc = "go"
+SDK_FEATURES:remove:linux-gnux32 = "go"
+SDK_FEATURES:remove:riscv32 = "go"
+SDK_FEATURES:remove:sdkmingw32 = "go"
+SDK_FEATURES:remove:powerpc = "go"
TOOLCHAIN_HOST_TASK ?= " \
nativesdk-packagegroup-sdk-host \
packagegroup-cross-canadian-${MACHINE} \
- ${@bb.utils.contains('SDK_TOOLCHAIN_LANGS', 'go', 'packagegroup-go-cross-canadian-${MACHINE}', '', d)} \
- ${@bb.utils.contains('SDK_TOOLCHAIN_LANGS', 'rust', 'packagegroup-rust-cross-canadian-${MACHINE}', '', d)} \
+ ${@bb.utils.contains('SDK_FEATURES', 'go', 'packagegroup-go-cross-canadian-${MACHINE}', '', d)} \
+ ${@bb.utils.contains('SDK_FEATURES', 'rust', 'packagegroup-rust-cross-canadian-${MACHINE}', '', d)} \
"
TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
TOOLCHAIN_TARGET_TASK ?= " \
${@oe.utils.multilib_pkg_extend(d, 'packagegroup-core-standalone-sdk-target')} \
- ${@bb.utils.contains('SDK_TOOLCHAIN_LANGS', 'go', oe.utils.multilib_pkg_extend(d, 'packagegroup-go-sdk-target'), '', d)} \
- ${@bb.utils.contains('SDK_TOOLCHAIN_LANGS', 'rust', oe.utils.multilib_pkg_extend(d, 'libstd-rs'), '', d)} \
+ ${@bb.utils.contains('SDK_FEATURES', 'go', oe.utils.multilib_pkg_extend(d, 'packagegroup-go-sdk-target'), '', d)} \
+ ${@bb.utils.contains('SDK_FEATURES', 'rust', oe.utils.multilib_pkg_extend(d, 'libstd-rs'), '', d)} \
target-sdk-provides-dummy \
"
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index c402f9f0b7c8..8eae49650bd3 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -128,6 +128,7 @@ BB_RENAMED_VARIABLES[DISTRO_FEATURES_BACKFILL_CONSIDERED] = "DISTRO_FEATURES_OPT
BB_RENAMED_VARIABLES[MACHINE_FEATURES_DEFAULT] = "is obsolete, add all default features to MACHINE_FEATURES_DEFAULTS"
BB_RENAMED_VARIABLES[MACHINE_FEATURES_BACKFILL] = "is obsolete, add all default features to MACHINE_FEATURES_DEFAULTS"
BB_RENAMED_VARIABLES[MACHINE_FEATURES_BACKFILL_CONSIDERED] = "MACHINE_FEATURES_OPTED_OUT"
+BB_RENAMED_VARIABLES[SDK_TOOLCHAIN_LANGS] = "SDK_FEATURES"
##################################################################
# Architecture-dependent build variables.
diff --git a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
index a9ae99a451e6..4f1b1ca777f6 100644
--- a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
+++ b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
@@ -9,6 +9,6 @@ IMAGE_CLASSES += 'testimage'
SDK_EXT_TYPE = 'minimal'
SDK_INCLUDE_TOOLCHAIN = '1'
ESDK_LOCALCONF_REMOVE:append = 'BB_HASHSERVE'
-SDK_TOOLCHAIN_LANGS += 'go rust'
+SDK_FEATURES += 'go rust'
PTEST_EXPECT_FAILURE = '1'
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index 4a147c059e96..b3010d767456 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -10,7 +10,7 @@ inherit packagegroup
#PACKAGEFUNCS =+ 'generate_sdk_pkgs'
-TARGET_TOOLCHAIN_LANGS ??= "${SDK_TOOLCHAIN_LANGS}"
+TARGET_TOOLCHAIN_LANGS ??= "${@bb.utils.filter('SDK_FEATURES', 'go rust', d)}"
TARGET_TOOLCHAIN_LANGS:remove:sdkmingw32 = "rust"
# libstd-rs doesn't build for mips n32 with compiler constraint errors
TARGET_TOOLCHAIN_LANGS:remove:mipsarchn32 = "rust"
--
2.50.0.173.g8b6f19ccfc3a
prev parent reply other threads:[~2026-08-07 0:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 0:17 [PATCH v2 0/2] add an SDK_FEATURES lever Trevor Woerner
2026-08-07 0:17 ` [PATCH v2 1/2] bitbake.conf: " Trevor Woerner
2026-08-07 0:17 ` Trevor Woerner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260807001744.3874352-3-twoerner@gmail.com \
--to=twoerner@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.