From 61aaa2c59742edacd363b02185f2a4e002c9fc4f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 21 Feb 2026 08:16:45 +0000 Subject: [PATCH] nativesdk/crosssdk: Fix DISTRO_FEATURES_BACKFILL handling Similar to native, backfilling of items from DISTRO_FEATURES when combined with DISTRO_FEATURES_FILTER_NATIVESDK was not functioning correctly. Ensure the backfill is applied before filtering, then clear the value to prevent further backfill. This makes the nativesdk and crosssdk cases match the native code. Signed-off-by: Richard Purdie Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/classes-recipe/crosssdk.bbclass | 2 ++ meta/classes-recipe/nativesdk.bbclass | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/crosssdk.bbclass b/meta/classes-recipe/crosssdk.bbclass index 3541c2c393..a2853e6a92 100644 --- a/meta/classes-recipe/crosssdk.bbclass +++ b/meta/classes-recipe/crosssdk.bbclass @@ -19,8 +19,10 @@ python () { # Set features here to prevent appends and distro features backfill # from modifying nativesdk distro features features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split()) + oe.utils.features_backfill("DISTRO_FEATURES", d) filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split()) d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered))) + d.setVar("DISTRO_FEATURES_BACKFILL", "") } STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" diff --git a/meta/classes-recipe/nativesdk.bbclass b/meta/classes-recipe/nativesdk.bbclass index c2e53c8450..4404a18856 100644 --- a/meta/classes-recipe/nativesdk.bbclass +++ b/meta/classes-recipe/nativesdk.bbclass @@ -17,7 +17,6 @@ CLASSOVERRIDE = "class-nativesdk" MACHINEOVERRIDES = "" MACHINE_FEATURES = "${SDK_MACHINE_FEATURES}" -DISTRO_FEATURES_BACKFILL = "" MACHINE_FEATURES_BACKFILL = "" MULTILIBS = "" @@ -85,8 +84,10 @@ python nativesdk_virtclass_handler () { # Set features here to prevent appends and distro features backfill # from modifying nativesdk distro features features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split()) + oe.utils.features_backfill("DISTRO_FEATURES", d) filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split()) d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered))) + d.setVar("DISTRO_FEATURES_BACKFILL", "") e.data.setVar("MLPREFIX", "nativesdk-") e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN").replace("-nativesdk", "").replace("nativesdk-", "")) -- 2.47.3