* [PATCH v2 0/2] add an SDK_FEATURES lever
@ 2026-08-07 0:17 Trevor Woerner
2026-08-07 0:17 ` [PATCH v2 1/2] bitbake.conf: " Trevor Woerner
2026-08-07 0:17 ` [PATCH v2 2/2] sdk: fold SDK_TOOLCHAIN_LANGS into SDK_FEATURES Trevor Woerner
0 siblings, 2 replies; 3+ messages in thread
From: Trevor Woerner @ 2026-08-07 0:17 UTC (permalink / raw)
To: openembedded-core
SDK contents are close to all-or-nothing today. The one lever that
exists, SDK_TOOLCHAIN_LANGS, has the right shape but only ever covered
languages.
Add SDK_FEATURES, in the spirit of DISTRO_FEATURES and IMAGE_FEATURES,
and fold SDK_TOOLCHAIN_LANGS into it. BB_RENAMED_VARIABLES keeps the old
name working.
Every SDK_FEATURES test resolves inside TOOLCHAIN_HOST_TASK and
TOOLCHAIN_TARGET_TASK, which are packagegroup lists read at populate_sdk
time. Nothing in a compiler's configure ever sees SDK_FEATURES, so
changing it rebuilds no toolchain and two SDKs with different features
share everything underneath. That property is the point of the design and
the rest of this work depends on it.
This changes no existing SDK: SDK_FEATURES defaults to empty, and
BB_RENAMED_VARIABLES maps SDK_TOOLCHAIN_LANGS onto it so configurations
still using the old name keep working.
Changes in v2:
- autobuilder.conf keeps += rather than switching to :append
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Trevor Woerner (2):
bitbake.conf: add an SDK_FEATURES lever
sdk: fold SDK_TOOLCHAIN_LANGS into SDK_FEATURES
meta/classes-recipe/populate_sdk_base.bbclass | 21 +++++++++----------
meta/conf/bitbake.conf | 2 ++
meta/conf/documentation.conf | 1 +
.../yocto-autobuilder/autobuilder.conf | 2 +-
.../packagegroups/packagegroup-core-sdk.bb | 2 +-
5 files changed, 15 insertions(+), 13 deletions(-)
--
2.50.0.173.g8b6f19ccfc3a
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] bitbake.conf: add an SDK_FEATURES lever
2026-08-07 0:17 [PATCH v2 0/2] add an SDK_FEATURES lever Trevor Woerner
@ 2026-08-07 0:17 ` Trevor Woerner
2026-08-07 0:17 ` [PATCH v2 2/2] sdk: fold SDK_TOOLCHAIN_LANGS into SDK_FEATURES Trevor Woerner
1 sibling, 0 replies; 3+ messages in thread
From: Trevor Woerner @ 2026-08-07 0:17 UTC (permalink / raw)
To: openembedded-core
Add SDK_FEATURES, a list for optionally adding features to a standalone
SDK in the same spirit as DISTRO_FEATURES and IMAGE_FEATURES. It only
introduces the variable and its documentation, defaulting to empty, so
nothing consumes it yet.
AI-Generated: codex/claude-opus 4.8 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v2:
- none
---
meta/conf/bitbake.conf | 1 +
meta/conf/documentation.conf | 1 +
2 files changed, 2 insertions(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1830cab753e6..c402f9f0b7c8 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -898,6 +898,7 @@ OES_BITBAKE_CONF = "1"
MACHINE_FEATURES:append = " ${@oe.utils.filter_default_features('MACHINE_FEATURES', d)}"
SDK_MACHINE_FEATURES ?= ""
+SDK_FEATURES ?= ""
DISTRO_FEATURES:append = " ${@oe.utils.filter_default_features('DISTRO_FEATURES', d)}"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 1a6ec8fdd5bc..4c5a5ee8c233 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -362,6 +362,7 @@ SANITY_TESTED_DISTROS[doc] = "A list of the host distribution identifiers that t
SDK_ARCH[doc] = "The target architecture for the SDK."
SDK_DEPLOY[doc] = "The directory set up and used by the populate_sdk_base to which the SDK is deployed."
SDK_DIR[doc] = "The parent directory used by the OpenEmbedded build system when creating SDK output."
+SDK_FEATURES[doc] = "The list of features to include in a standalone SDK, resolved at populate_sdk time. Analogous to IMAGE_FEATURES but for the SDK."
SDK_NAME[doc] = "The base name for SDK output files."
SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creating SDK output."
SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'."
--
2.50.0.173.g8b6f19ccfc3a
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] sdk: fold SDK_TOOLCHAIN_LANGS into SDK_FEATURES
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
1 sibling, 0 replies; 3+ messages in thread
From: Trevor Woerner @ 2026-08-07 0:17 UTC (permalink / raw)
To: openembedded-core
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-07 0:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 2/2] sdk: fold SDK_TOOLCHAIN_LANGS into SDK_FEATURES Trevor Woerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox