From 7765d89009f9ace12e600d9e6650fa8f019ba034 Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Wed, 3 Jun 2020 20:24:02 -0400 Subject: [PATCH] external-arm-toolchain: un-break target compilation Compiling on the target using runtime libs from external-arm-toolchain requires libgcc.a, as libgcc_s.so explains: /* GNU ld script Use the shared library, but some functions are only in the static library. */ GROUP ( libgcc_s.so.1 -lgcc ) Otherwise it results in errors like: | /usr/lib/gcc/arm-linux-gnueabi/9.2.1/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgcc | /usr/lib/gcc/arm-linux-gnueabi/9.2.1/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgcc | collect2: error: ld returned 1 exit status This already has been fixed before in this commit: https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce But then it got broken/undone here w/o due review: https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=b43d5f0ce431ba1e242504641266a63293ded5db Even though it's a static library, we want it to be in libgcc-dev as it's not optional, but rather required for development. Signed-off-by: Denys Dmytriyenko Reviewed-by: Sumit Garg Signed-off-by: Jon Mason --- .../external-arm-toolchain/external-arm-toolchain.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 04d8923b..8cfc2081 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 @@ -117,7 +117,7 @@ do_install() { sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/ldd cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ - + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ @@ -310,6 +310,7 @@ INSANE_SKIP_${PN}-utils += "ldflags" INSANE_SKIP_libstdc++ += "ldflags" INSANE_SKIP_libgfortran += "ldflags" INSANE_SKIP_libgcc += "ldflags dev-deps" +INSANE_SKIP_libgcc-dev += "staticdev" INSANE_SKIP_libgfortran += "ldflags dev-deps" INSANE_SKIP_libstdc++ += "ldflags dev-deps" INSANE_SKIP_libatomic += "ldflags"