From: Denys Dmytriyenko denys@ti.com
This set cleans up and adds additional features to external-arm-toolchain recipe.
It packages up libc binaries like ldconfig, locale, tzselect, ldd and so on. That results in a proper non-empty glibc-utils package, which gets pulled by LIBC_DEPENDENCIES variable defined in tclibc-glibc.inc in OE-Core
It also packages up necessary static libs, stubs and headers for -dev variants of libgcc, libgfortran, etc., satisfying packagegroup-core-standalone-sdk-target recipe from OE-Core.
Please merge this set to master and backport it to thud as well. Thanks.
Denys Dmytriyenko (3): external-arm-toolchain: basic cleanup external-arm-toolchain: package up toolchain binaries external-arm-toolchain: also package up extra libs, stubs and headers
.../external-arm-toolchain.bb | 45 ++++++++++++++++------ 1 file changed, 33 insertions(+), 12 deletions(-)
From: Denys Dmytriyenko denys@ti.com
* unify whitespace indentation * remove trailing spaces * use cp $CP_ARGS instead of cp -a * remove spurious # cat kjasdkjasd
Signed-off-by: Denys Dmytriyenko denys@ti.com --- .../external-arm-toolchain/external-arm-toolchain.bb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 2cdba34..2976be9 100644 --- a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -66,7 +66,7 @@ do_install() { touch ${S}/nscd/nscd.init touch ${S}/nscd/nscd.conf touch ${S}/nscd/nscd.service - touch ${S}/../makedbs.sh + touch ${S}/../makedbs.sh
install -d ${D}${base_libdir} install -d ${D}${bindir} @@ -103,7 +103,7 @@ do_install() { rm -r ${D}${includedir}/${EAT_TARGET_SYS} fi
- cp -a ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} ln -sf ../usr/include/c++ ${D}/include/c++
# fix up the copied symlinks (they are still pointing to the multiarch directory) @@ -141,8 +141,8 @@ do_install() { # lib?san is duplicated *and* the files are all hardlinks for lib in lsan tsan ; do rm -f ${D}${libdir}/lib${lib}.so.0 ${D}${libdir}/lib${lib}.so ${D}${base_libdir}/lib${lib}* - ln -sf lib${lib}.so.0.0.0 ${D}${libdir}/lib${lib}.so.0 - ln -sf lib${lib}.so.0.0.0 ${D}${libdir}/lib${lib}t.so + ln -sf lib${lib}.so.0.0.0 ${D}${libdir}/lib${lib}.so.0 + ln -sf lib${lib}.so.0.0.0 ${D}${libdir}/lib${lib}t.so done
# remove potential .so duplicates from base_libdir @@ -212,11 +212,10 @@ do_install() { # Provided by quota rm -rf ${D}${includedir}/rpcsvc/rquota.*
- if [ -f ${D}${libdir}/libc.so ];then - sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so - sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so - # cat kjasdkjasd - fi + if [ -f ${D}${libdir}/libc.so ];then + sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so + sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so + fi
if [ -f ${D}${base_libdir}/libc.so ];then sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so @@ -225,7 +224,7 @@ do_install() { fi fi if [ -f ${D}${base_libdir}/libpthread.so.0 ]; then - sed -i -e "s# /usr/${EAT_LIBDIR}/libpthread.so.0# /lib/libpthread.so.0#g" ${D}${base_libdir}/libpthread.so.0 + sed -i -e "s# /usr/${EAT_LIBDIR}/libpthread.so.0# /lib/libpthread.so.0#g" ${D}${base_libdir}/libpthread.so.0 fi
# Remove if empty
From: Denys Dmytriyenko denys@ti.com
* Copy all ${bindir} and ${sbindir} binaries from the external toolchain * That would package ldconfig, locale, tzselect and ldd, among others * All the necessary FILES_* variables are already set up for them * Remove gdbserver binary, as it's not listed in PROVIDES for now * Fix couple shell scripts that hardcode bogus hashbang path for /bin/bash * Also add RDEPENDS on bash for those scripts * Set PKGV to libc version - this is needed because PV is set to toolchain version and when -dev/-dbg depends on the main package, it ends up using the wrong version. E.g. libc6-dev ends up depending on main libc version 2019.01 instead of 2.28, which prevents it from being installed properly.
Signed-off-by: Denys Dmytriyenko denys@ti.com --- .../external-arm-toolchain/external-arm-toolchain.bb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 2976be9..2437856 100644 --- a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -4,8 +4,6 @@ INHIBIT_DEFAULT_DEPS = "1" INHIBIT_PACKAGE_STRIP = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-ALLOW_EMPTY_ldd = "1" - # License applies to this recipe code, not the toolchain itself LICENSE = "MIT" LIC_FILES_CHKSUM = "\ @@ -106,6 +104,12 @@ do_install() { cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} ln -sf ../usr/include/c++ ${D}/include/c++
+ cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir} + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/sbin/* ${D}${sbindir} + rm -rf ${D}${bindir}/gdbserver + sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/tzselect + sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/ldd + # fix up the copied symlinks (they are still pointing to the multiarch directory) linker_name="${@bb.utils.contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}" ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name} @@ -338,6 +342,7 @@ PKG_${PN}-thread-db = "glibc-thread-db" PKG_${PN}-pcprofile = "glibc-pcprofile" PKG_${PN}-staticdev = "glibc-staticdev"
+PKGV = "${EAT_VER_LIBC}" PKGV_${PN} = "${EAT_VER_LIBC}" PKGV_${PN}-dev = "${EAT_VER_LIBC}" PKGV_${PN}-doc = "${EAT_VER_LIBC}" @@ -419,6 +424,9 @@ FILES_libsegfault = "${base_libdir}/libSegFault*" FILES_catchsegv = "${bindir}/catchsegv" RDEPENDS_catchsegv = "libsegfault"
+RDEPENDS_ldd = "bash" +RDEPENDS_tzcode = "bash" + # From libgfortran.inc:
FILES_libgfortran = "${libdir}/libgfortran.so.*"
From: Denys Dmytriyenko denys@ti.com
* Install additional static libs, stubs and header files * Needed for -dev versions of libgcc, libgfortran and other packages * All the FILES_* variables are already set up for them * FILES_* are inherited from OE-Core and use BINV and TARGET_SYS references * Initialize BINV and TARGET_SYS with corresponding similar EAT_* versions * libgcc from OE-Core doesn't follow the same path as gcc, hence ${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC} vs. ${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}
Signed-off-by: Denys Dmytriyenko denys@ti.com --- .../external-arm-toolchain/external-arm-toolchain.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 2437856..6fb5a4d 100644 --- a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -56,6 +56,9 @@ PROVIDES += "\
PV = "${EAT_VER_MAIN}"
+BINV = "${EAT_VER_GCC}" +TARGET_SYS = "${EAT_TARGET_SYS}" + SRC_URI = "file://SUPPORTED"
do_install() { @@ -74,6 +77,8 @@ do_install() { install -d ${D}${datadir} install -d ${D}${includedir} install -d ${D}/include + install -d ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC} + install -d ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}
CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir} @@ -110,6 +115,15 @@ do_install() { sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/tzselect sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/ldd
+ cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgfortranbegin.* ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ || true + cp ${CP_ARGS} -H ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libcaf_single* ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + # fix up the copied symlinks (they are still pointing to the multiarch directory) linker_name="${@bb.utils.contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}" ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name}