[meta-arm,v3,2/5] external-arm-toolchain: Refine dev libraries/headers packaging

Submitted by Sumit Garg on June 12, 2020, 10:32 a.m. | Patch ID: 173501

Details

Message ID 1591957928-5959-3-git-send-email-sumit.garg@linaro.org
State New
Headers show

Commit Message

Sumit Garg June 12, 2020, 10:32 a.m.
OE core by default package all libraies/headers installed as
"${libdir}/lib*.so", "${libdir}/*.la" and {includedir} as part of
FILES_${PN}-dev" but in case of external Arm toolchain recipe, multiple
packages are provided which needs to include specific libraries and
headers. And "${PN}-dev" is only meant to pick up remaining dev libraries
and headers that aren't picked up by other packages.

So in order to achieve above objective, re-order PACKAGES list to shift
${PN}-dev towards the end. And since some static libraries needs to be
packaged in ${PN}-dev, so we need to keep ${PN}-staticdev later in order.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
---
 .../external-arm-toolchain/external-arm-toolchain.bb        | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
index 8cfc208..73a2cf6 100644
--- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
+++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
@@ -305,6 +305,19 @@  PACKAGES =+ "\
 	linux-libc-headers-dev \
 "
 
+# Re-order PACKAGES list in order to shift ${PN}-dev towards the end as
+# it is meant to pick up remaining dev libraries and headers that aren't
+# picked up by other packages. And since some static libraries needs to
+# be packaged in ${PN}-dev, so we need to keep ${PN}-staticdev later in
+# order.
+
+PACKAGES := "${@oe.utils.str_filter_out('${PN}-dev', '${PACKAGES}', d)}"
+PACKAGES := "${@oe.utils.str_filter_out('${PN}-staticdev', '${PACKAGES}', d)}"
+PACKAGES += "\
+	${PN}-dev \
+	${PN}-staticdev \
+"
+
 INSANE_SKIP_${PN}-dbg = "staticdev"
 INSANE_SKIP_${PN}-utils += "ldflags"
 INSANE_SKIP_libstdc++ += "ldflags"