summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-19 18:05:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-20 23:50:30 +0100
commit37126ffc7ccbd3df57ebbd8e581d158f03bb3b4c (patch)
tree6ecf06bce0aacafbd7bfbe96ade903c32ae6f4b3
parentca90379147cb75755d205670781d8922161e9317 (diff)
downloadopenembedded-core-contrib-37126ffc7ccbd3df57ebbd8e581d158f03bb3b4c.tar.gz
multilib: fix SSTATE_ARCHS for multilib usage
When building multilibs, we need to inject the multilib sstate pkgarch into SSTATE_ARCHS so the list forms a complete search path. Add a tweak to do this. PACKAGE_ARCH defaults to TUNE_PKGARCH so this is equivalent and just guards against recipes changing the value which may have other unwanted side effects. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-global/sstate.bbclass3
-rw-r--r--meta/classes-recipe/image.bbclass1
-rw-r--r--meta/classes/multilib.bbclass3
3 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 275917ed7f..d846e22f44 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -85,6 +85,7 @@ SSTATE_HASHEQUIV_FILEMAP ?= " \
BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
+SSTATE_ARCHS_TUNEPKG ??= "${TUNE_PKGARCH}"
SSTATE_ARCHS = " \
${BUILD_ARCH} \
${BUILD_ARCH}_${ORIGNATIVELSBSTRING} \
@@ -92,7 +93,7 @@ SSTATE_ARCHS = " \
${SDK_ARCH}_${SDK_OS} \
${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX} \
allarch \
- ${PACKAGE_ARCH} \
+ ${SSTATE_ARCHS_TUNEPKG} \
${PACKAGE_EXTRA_ARCHS} \
${MACHINE_ARCH}"
SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING"
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 4f00162e78..7231fad940 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -96,6 +96,7 @@ USE_DEPMOD ?= "1"
PID = "${@os.getpid()}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
+SSTATE_ARCHS_TUNEPKG = "${@all_multilib_tune_values(d, 'TUNE_PKGARCH')}"
LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot"
LDCONFIGDEPEND:libc-musl = ""
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 8a1a51aaba..d80a34cf27 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -30,6 +30,9 @@ python multilib_virtclass_handler () {
if val:
e.data.setVar(name + "_MULTILIB_ORIGINAL", val)
+ # We nearly don't need this but dependencies on NON_MULTILIB_RECIPES don't work without it
+ d.setVar("SSTATE_ARCHS_TUNEPKG", "${@all_multilib_tune_values(d, 'TUNE_PKGARCH')}")
+
overrides = e.data.getVar("OVERRIDES", False)
pn = e.data.getVar("PN", False)
overrides = overrides.replace("pn-${PN}", "pn-${PN}:pn-" + pn)