nativesdk/crosssdk: Fix DISTRO_FEATURES_BACKFILL handling
PATCH 1/3 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.
--- meta/classes-recipe/crosssdk.bbclass | 2 ++ meta/classes-recipe/nativesdk.bbclass | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
meta/classes-recipe/crosssdk.bbclass +2 -0
@@ -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}"
meta/classes-recipe/nativesdk.bbclass +2 -1
@@ -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-", ""))
PATCH 2/3 binutils: Drop unneeded and problematic vardeps explict value and immediate expansion
This was introduced in 0788cf349fe37ef4a36c626dbc396c97d1ab14d7 as a way of tracking the EXTRA_OECONF changes. These should be tracked reliably by the contains() code now so it is assumed this was working around a bug at the time. I checked the current task hashes and that information is there.
Therefore drop this bit of code as the immediate expansion causes inaccurate values.
--- meta/recipes-devtools/binutils/binutils.inc | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +0 -2
@@ -129,8 +129,6 @@ export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" # to unset LD_LIBRARY_PATH. export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}" -MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}" -do_configure[vardeps] += "MULTIARCH" do_configure () { (cd ${S} && gnu-configize)
PATCH 3/3 conf/distro: Drop default-versions.inc
In reply to Richard PurdieThis conf file used to be useful when we had multiple versions of recipes but we no longer do that and the file is empty. Remove it as obsolete and not needed anymore.
--- meta/conf/distro/defaultsetup.conf | 1 - meta/conf/distro/include/default-versions.inc | 3 --- 2 files changed, 4 deletions(-) delete mode 100644 meta/conf/distro/include/default-versions.inc
meta/conf/distro/defaultsetup.conf +0 -1
@@ -1,5 +1,4 @@ include conf/distro/include/default-providers.inc -include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc include_all conf/distro/include/maintainers.inc include conf/distro/include/time64.inc
meta/conf/distro/include/default-versions.inc deleted +0 -3
@@ -1,3 +0,0 @@ -# -# Default preferred versions -#