Message ID | 1591957928-5959-4-git-send-email-sumit.garg@linaro.org |
---|---|
State | New |
Headers | show |
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 73a2cf6..4face74 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 @@ -54,7 +54,6 @@ PROVIDES += "\ PV = "${EAT_VER_MAIN}" BINV = "${EAT_VER_GCC}" -TARGET_SYS = "${EAT_TARGET_SYS}" SRC_URI = "file://SUPPORTED" @@ -75,8 +74,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} + install -d ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC} + install -d ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC} CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir} @@ -105,6 +104,9 @@ do_install() { fi cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} + if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then + mv ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${TARGET_SYS} + fi ln -sf ../usr/include/c++ ${D}/include/c++ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir} @@ -116,11 +118,11 @@ do_install() { sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect 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}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${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)}" diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc index 5599743..392c57f 100644 --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc @@ -12,7 +12,7 @@ do_install_prepend_class-target () { if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ - install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ + install ${STAGING_LIBDIR}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ fi }
Sorry, did we agree to drop this one for now? On Fri, Jun 12, 2020 at 04:02:06PM +0530, Sumit Garg wrote: > OE native and cross compilers (in case of SDK) uses OE TARGET_SYS to > create standard paths to search for libraries and headers during > compilation. > > Currently external-arm-toolchain recipe temporarily override TARGET_SYS > with EAT_TARGET_SYS and packages libraries and headers corresponding to > EAT_TARGET_SYS which leads to failures during native and cross compilation > (in case of SDK) such as: > > $ $CXX -o hello++ hello.cpp > In file included from hello.cpp:1: > /tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory > 38 | #include <bits/c++config.h> > | ^~~~~~~~~~~~~~~~~~ > compilation terminated. > > $ $CC hello.c > real-ld: cannot find crtbeginS.o: No such file or directory > > So remove temp override of TARGET_SYS and rather package libraries and > headers corresponding to OE TARGET_SYS. > > This fixes changes added in commit: > https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce > > Also, update location for unwind.h gcc-arm-common.inc accordingly. > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org> > --- > .../external-arm-toolchain/external-arm-toolchain.bb | 18 ++++++++++-------- > .../recipes-devtools/gcc/gcc-arm-common.inc | 2 +- > 2 files changed, 11 insertions(+), 9 deletions(-) > > 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 73a2cf6..4face74 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 > @@ -54,7 +54,6 @@ PROVIDES += "\ > PV = "${EAT_VER_MAIN}" > > BINV = "${EAT_VER_GCC}" > -TARGET_SYS = "${EAT_TARGET_SYS}" > > SRC_URI = "file://SUPPORTED" > > @@ -75,8 +74,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} > + install -d ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC} > + install -d ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC} > > CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir} > @@ -105,6 +104,9 @@ do_install() { > fi > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} > + if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then > + mv ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${TARGET_SYS} > + fi > ln -sf ../usr/include/c++ ${D}/include/c++ > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir} > @@ -116,11 +118,11 @@ do_install() { > sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect > 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}/ > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${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)}" > diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > index 5599743..392c57f 100644 > --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > @@ -12,7 +12,7 @@ > do_install_prepend_class-target () { > if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then > install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > - install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > + install ${STAGING_LIBDIR}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > fi > } > > -- > 2.7.4 > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#693): https://lists.yoctoproject.org/g/meta-arm/message/693 Mute This Topic: https://lists.yoctoproject.org/mt/74836406/3617530 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [oe-patchwork@oe-patch.openembedded.org] -=-=-=-=-=-=-=-=-=-=-=-
On Thu, 18 Jun 2020 at 00:47, Denys Dmytriyenko <denis@denix.org> wrote: > > Sorry, did we agree to drop this one for now? No, I don't think so. See our last conversation on v2 [1]. I think you have already addressed alignment to EAT_TARGET_SYS for pre-built toolchain components packaging in SDK as part of your recipe: external-arm-sdk-toolchain.bb. But we still need this fix for native compilation to work using native OE compiler built from source. [1] https://lists.yoctoproject.org/g/meta-arm/message/637 -Sumit > > On Fri, Jun 12, 2020 at 04:02:06PM +0530, Sumit Garg wrote: > > OE native and cross compilers (in case of SDK) uses OE TARGET_SYS to > > create standard paths to search for libraries and headers during > > compilation. > > > > Currently external-arm-toolchain recipe temporarily override TARGET_SYS > > with EAT_TARGET_SYS and packages libraries and headers corresponding to > > EAT_TARGET_SYS which leads to failures during native and cross compilation > > (in case of SDK) such as: > > > > $ $CXX -o hello++ hello.cpp > > In file included from hello.cpp:1: > > /tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory > > 38 | #include <bits/c++config.h> > > | ^~~~~~~~~~~~~~~~~~ > > compilation terminated. > > > > $ $CC hello.c > > real-ld: cannot find crtbeginS.o: No such file or directory > > > > So remove temp override of TARGET_SYS and rather package libraries and > > headers corresponding to OE TARGET_SYS. > > > > This fixes changes added in commit: > > https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce > > > > Also, update location for unwind.h gcc-arm-common.inc accordingly. > > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org> > > --- > > .../external-arm-toolchain/external-arm-toolchain.bb | 18 ++++++++++-------- > > .../recipes-devtools/gcc/gcc-arm-common.inc | 2 +- > > 2 files changed, 11 insertions(+), 9 deletions(-) > > > > 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 73a2cf6..4face74 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 > > @@ -54,7 +54,6 @@ PROVIDES += "\ > > PV = "${EAT_VER_MAIN}" > > > > BINV = "${EAT_VER_GCC}" > > -TARGET_SYS = "${EAT_TARGET_SYS}" > > > > SRC_URI = "file://SUPPORTED" > > > > @@ -75,8 +74,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} > > + install -d ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC} > > + install -d ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC} > > > > CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir} > > @@ -105,6 +104,9 @@ do_install() { > > fi > > > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} > > + if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then > > + mv ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${TARGET_SYS} > > + fi > > ln -sf ../usr/include/c++ ${D}/include/c++ > > > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir} > > @@ -116,11 +118,11 @@ do_install() { > > sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect > > 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}/ > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${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)}" > > diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > > index 5599743..392c57f 100644 > > --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > > +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > > @@ -12,7 +12,7 @@ > > do_install_prepend_class-target () { > > if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then > > install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > > - install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > > + install ${STAGING_LIBDIR}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > > fi > > } > > > > -- > > 2.7.4 > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#697): https://lists.yoctoproject.org/g/meta-arm/message/697 Mute This Topic: https://lists.yoctoproject.org/mt/74836406/3617530 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [oe-patchwork@oe-patch.openembedded.org] -=-=-=-=-=-=-=-=-=-=-=-
On Thu, Jun 18, 2020 at 11:04:16AM +0530, Sumit Garg wrote: > On Thu, 18 Jun 2020 at 00:47, Denys Dmytriyenko <denis@denix.org> wrote: > > > > Sorry, did we agree to drop this one for now? > > No, I don't think so. See our last conversation on v2 [1]. > > I think you have already addressed alignment to EAT_TARGET_SYS for > pre-built toolchain components packaging in SDK as part of your > recipe: external-arm-sdk-toolchain.bb. > > But we still need this fix for native compilation to work using native > OE compiler built from source. > > [1] https://lists.yoctoproject.org/g/meta-arm/message/637 In there we talked about symlinks between OE TARGET_SYS and EAT_TARGET_SYS. Those symlinks will allow using OE-built compilers and prebuilt binaries interchangeably. But we don't yet have them in place - that's still on my todo list. I have the code in meta-arago and it works for prebuilt cross compiler in SDK as well as OE-built native compiler on the target - I just need to get that upstreamed. The 4 patches I submitted only set the stage by packaging up the prebuilts... And the change in this patch alone only makes OE-built compiler work while breaking prebuilt usage.
On Thu, 18 Jun 2020 at 12:33, Denys Dmytriyenko <denis@denix.org> wrote: > > On Thu, Jun 18, 2020 at 11:04:16AM +0530, Sumit Garg wrote: > > On Thu, 18 Jun 2020 at 00:47, Denys Dmytriyenko <denis@denix.org> wrote: > > > > > > Sorry, did we agree to drop this one for now? > > > > No, I don't think so. See our last conversation on v2 [1]. > > > > I think you have already addressed alignment to EAT_TARGET_SYS for > > pre-built toolchain components packaging in SDK as part of your > > recipe: external-arm-sdk-toolchain.bb. > > > > But we still need this fix for native compilation to work using native > > OE compiler built from source. > > > > [1] https://lists.yoctoproject.org/g/meta-arm/message/637 > > In there we talked about symlinks between OE TARGET_SYS and EAT_TARGET_SYS. > Those symlinks will allow using OE-built compilers and prebuilt binaries > interchangeably. But we don't yet have them in place - that's still on my > todo list. Didn't I offer to add that feature in this patch itself to support your downstream use-cases? But you were reluctant to add those by yourself. > > I have the code in meta-arago and it works for prebuilt cross compiler in SDK > as well as OE-built native compiler on the target - I just need to get that > upstreamed. The 4 patches I submitted only set the stage by packaging up the > prebuilts... > > And the change in this patch alone only makes OE-built compiler work while > breaking prebuilt usage. The change in this patch is fixing the current broken OE native compilation and SDK generation (using OE built compiler) upstream. And it's just a simple change to add symlinks to support EAT_TARGET_SYS which can be an add-on patch which *you* contribute. -Sumit > > -- > Denys > > > > -Sumit > > > > > > > > On Fri, Jun 12, 2020 at 04:02:06PM +0530, Sumit Garg wrote: > > > > OE native and cross compilers (in case of SDK) uses OE TARGET_SYS to > > > > create standard paths to search for libraries and headers during > > > > compilation. > > > > > > > > Currently external-arm-toolchain recipe temporarily override TARGET_SYS > > > > with EAT_TARGET_SYS and packages libraries and headers corresponding to > > > > EAT_TARGET_SYS which leads to failures during native and cross compilation > > > > (in case of SDK) such as: > > > > > > > > $ $CXX -o hello++ hello.cpp > > > > In file included from hello.cpp:1: > > > > /tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory > > > > 38 | #include <bits/c++config.h> > > > > | ^~~~~~~~~~~~~~~~~~ > > > > compilation terminated. > > > > > > > > $ $CC hello.c > > > > real-ld: cannot find crtbeginS.o: No such file or directory > > > > > > > > So remove temp override of TARGET_SYS and rather package libraries and > > > > headers corresponding to OE TARGET_SYS. > > > > > > > > This fixes changes added in commit: > > > > https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce > > > > > > > > Also, update location for unwind.h gcc-arm-common.inc accordingly. > > > > > > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org> > > > > --- > > > > .../external-arm-toolchain/external-arm-toolchain.bb | 18 ++++++++++-------- > > > > .../recipes-devtools/gcc/gcc-arm-common.inc | 2 +- > > > > 2 files changed, 11 insertions(+), 9 deletions(-) > > > > > > > > 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 73a2cf6..4face74 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 > > > > @@ -54,7 +54,6 @@ PROVIDES += "\ > > > > PV = "${EAT_VER_MAIN}" > > > > > > > > BINV = "${EAT_VER_GCC}" > > > > -TARGET_SYS = "${EAT_TARGET_SYS}" > > > > > > > > SRC_URI = "file://SUPPORTED" > > > > > > > > @@ -75,8 +74,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} > > > > + install -d ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC} > > > > + install -d ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC} > > > > > > > > CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" > > > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir} > > > > @@ -105,6 +104,9 @@ do_install() { > > > > fi > > > > > > > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} > > > > + if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then > > > > + mv ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${TARGET_SYS} > > > > + fi > > > > ln -sf ../usr/include/c++ ${D}/include/c++ > > > > > > > > cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir} > > > > @@ -116,11 +118,11 @@ do_install() { > > > > sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect > > > > 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}/ > > > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ > > > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/ > > > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ > > > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/ > > > > + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${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)}" > > > > diff --git a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > > > > index 5599743..392c57f 100644 > > > > --- a/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > > > > +++ b/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc > > > > @@ -12,7 +12,7 @@ > > > > do_install_prepend_class-target () { > > > > if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then > > > > install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > > > > - install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > > > > + install ${STAGING_LIBDIR}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ > > > > fi > > > > } > > > > > > > > -- > > > > 2.7.4 > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#703): https://lists.yoctoproject.org/g/meta-arm/message/703 Mute This Topic: https://lists.yoctoproject.org/mt/74836406/3617530 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [oe-patchwork@oe-patch.openembedded.org] -=-=-=-=-=-=-=-=-=-=-=-
OE native and cross compilers (in case of SDK) uses OE TARGET_SYS to create standard paths to search for libraries and headers during compilation. Currently external-arm-toolchain recipe temporarily override TARGET_SYS with EAT_TARGET_SYS and packages libraries and headers corresponding to EAT_TARGET_SYS which leads to failures during native and cross compilation (in case of SDK) such as: $ $CXX -o hello++ hello.cpp In file included from hello.cpp:1: /tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory 38 | #include <bits/c++config.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. $ $CC hello.c real-ld: cannot find crtbeginS.o: No such file or directory So remove temp override of TARGET_SYS and rather package libraries and headers corresponding to OE TARGET_SYS. This fixes changes added in commit: https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce Also, update location for unwind.h gcc-arm-common.inc accordingly. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> --- .../external-arm-toolchain/external-arm-toolchain.bb | 18 ++++++++++-------- .../recipes-devtools/gcc/gcc-arm-common.inc | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-)