Skip to contentSkip to conversation

external-linaro-toolchain: reorder PACKAGES so libgcc-dev picks libgcc.a

PATCH Superseded Denys Dmytriyenko 1 participant 2 messages Feb 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 external-linaro-toolchain: reorder PACKAGES so libgcc-dev picks libgcc.a

Recent update to the upstream external-linaro-toolchain.bb in meta-linaro changed the order of PACKAGES and libgcc-dev is now towards the end of the list and has no chance of picking libgcc.a. Since native compiler on the target uses libgcc.a and expects it to come from libgcc-dev package, the fix is to move it up the PACKAGES list.

---
 .../recipes-core/meta/external-linaro-toolchain.bbappend             | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-arago-extras/recipes-core/meta/external-linaro-toolchain.bbappend +4 -1
index 31f5ba0..dda5607 100644
@@ -6,7 +6,7 @@ ALLOW_EMPTY_ldd = "1"
 ALLOW_EMPTY_libstdc++ = "1"
 ALLOW_EMPTY_libgomp = "1"
 
-PR_append = ".arago33"
+PR_append = ".arago34"
 
 PROVIDES := "${@oe_filter_out('virtual/linux-libc-headers', '${PROVIDES}', d)}"
 PROVIDES := "${@oe_filter_out('linux-libc-headers', '${PROVIDES}', d)}"
@@ -20,6 +20,9 @@ PACKAGES := "${@oe_filter_out('linux-libc-headers', '${PACKAGES}', d)}"
 
 PACKAGES += "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-linaro-toolchain', 'linux-libc-headers-dev', '', d)}"
 
+PACKAGES := "${@oe_filter_out('libgcc-dev', '${PACKAGES}', d)}"
+PACKAGES =+ "libgcc-dev"
+
 DEPENDS += "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-linaro-toolchain', '', 'linux-libc-headers', d)}"
 
 DEPENDS += "external-linaro-toolchain-cross-${TARGET_ARCH}"
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 external-linaro-toolchain: reorder PACKAGES so libgcc-dev picks libgcc.a

Recent update to the upstream external-linaro-toolchain.bb in meta-linaro changed the order of PACKAGES and libgcc-dev is now towards the end of the list and has no chance of picking libgcc.a. Since native compiler on the target uses libgcc.a and expects it to come from libgcc-dev package, the fix is to move it up the PACKAGES list.

Moreover, with gcc6, linaro prebuilt toolchain stopped packaging libgcc.a inside the target sysroot, so pick it up from gcc lib dir instead.

---
v2 - support gcc6 by copying libgcc.a from gcc lib dir

 .../recipes-core/meta/external-linaro-toolchain.bbappend           | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta-arago-extras/recipes-core/meta/external-linaro-toolchain.bbappend +6 -1
index 31f5ba0..7648e36 100644
@@ -6,7 +6,7 @@ ALLOW_EMPTY_ldd = "1"
 ALLOW_EMPTY_libstdc++ = "1"
 ALLOW_EMPTY_libgomp = "1"
 
-PR_append = ".arago33"
+PR_append = ".arago34"
 
 PROVIDES := "${@oe_filter_out('virtual/linux-libc-headers', '${PROVIDES}', d)}"
 PROVIDES := "${@oe_filter_out('linux-libc-headers', '${PROVIDES}', d)}"
@@ -20,6 +20,9 @@ PACKAGES := "${@oe_filter_out('linux-libc-headers', '${PACKAGES}', d)}"
 
 PACKAGES += "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-linaro-toolchain', 'linux-libc-headers-dev', '', d)}"
 
+PACKAGES := "${@oe_filter_out('libgcc-dev', '${PACKAGES}', d)}"
+PACKAGES =+ "libgcc-dev"
+
 DEPENDS += "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-linaro-toolchain', '', 'linux-libc-headers', d)}"
 
 DEPENDS += "external-linaro-toolchain-cross-${TARGET_ARCH}"
@@ -152,6 +155,8 @@ do_install_append() {
 		ln -sf ${TARGET_SYS} ${D}${libdir}/gcc/${ELT_TARGET_SYS}
 	fi
 
+	cp -a ${TOOLCHAIN_PATH}/${base_libdir}/gcc/${ELT_TARGET_SYS}/${ELT_VER_GCC}/libgcc.a ${D}${libdir}
+
 	${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-linaro-toolchain', '', 'rm -rf ${D}${includedir}/asm*; rm -rf ${D}${includedir}/drm; rm -rf ${D}${includedir}/linux; rm -rf ${D}${includedir}/mtd; rm -rf ${D}${includedir}/rdma; rm -rf ${D}${includedir}/sound; rm -rf ${D}${includedir}/video', d)}
 	${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-linaro-toolchain', '', 'rm -rf ${D}${includedir}/uapi/.install; rm -rf ${D}${includedir}/misc/.install; rm -rf ${D}${includedir}/misc/cxl.h; rm -rf ${D}${includedir}/scsi/.install; rm -rf ${D}${includedir}/scsi/scsi_netlink*; rm -rf ${D}${includedir}/scsi/scsi_bsg*; rm -rf ${D}${includedir}/scsi/cxlflash_ioctl.h; rm -rf ${D}${includedir}/scsi/fc; rm -rf ${D}${includedir}/xen', d)}
 
Signature · 1 line
2.7.4