All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denys Dmytriyenko" <denis@denix.org>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: meta-arm@lists.yoctoproject.org,
	Paul Barker <pbarker@konsulko.com>,
	wmills@ti.com,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Daniel Thompson <daniel.thompson@linaro.org>
Subject: Re: [meta-arm] [PATCH v3 3/5] external-arm-toolchain: Align glibc packaging to OE TARGET_SYS
Date: Thu, 18 Jun 2020 03:03:06 -0400	[thread overview]
Message-ID: <20200618070306.GC17660@denix.org> (raw)
In-Reply-To: <CAFA6WYNud9Q=H3zrwb=7EUg-JkwUHhTzgbuOHb-kNOqa04zUeg@mail.gmail.com>

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.

-- 
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
> > >

> 


  reply	other threads:[~2020-06-18  7:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 10:32 [PATCH v3 0/5] external-arm-toolchain: Add support for SDK generation Sumit Garg
2020-06-12 10:32 ` [PATCH v3 1/5] external-arm-toolchain: Remove glibc locale dependency Sumit Garg
2020-06-12 10:32 ` [PATCH v3 2/5] external-arm-toolchain: Refine dev libraries/headers packaging Sumit Garg
2020-06-12 10:32 ` [PATCH v3 3/5] external-arm-toolchain: Align glibc packaging to OE TARGET_SYS Sumit Garg
2020-06-17 19:17   ` Denys Dmytriyenko
2020-06-18  5:34     ` Sumit Garg
2020-06-18  7:03       ` Denys Dmytriyenko [this message]
2020-06-18  8:12         ` [meta-arm] " Sumit Garg
2020-06-12 10:32 ` [PATCH v3 4/5] meta-arm-toolchain: Add README Sumit Garg
2020-06-15 18:16   ` [meta-arm] " Jon Mason
2020-06-16  5:28     ` Sumit Garg
2020-06-17 18:58       ` Jon Mason
2020-06-17 19:21         ` Denys Dmytriyenko
2020-06-18  5:47         ` Sumit Garg
2020-06-18 22:53           ` Jon Mason
     [not found]     ` <20200616100639.7gx6fzyz2m7czcs4@holly.lan>
2020-06-17 18:52       ` Jon Mason
2020-06-12 10:32 ` [PATCH v3 5/5] external-arm-toolchain: Add package specific licenses Sumit Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200618070306.GC17660@denix.org \
    --to=denis@denix.org \
    --cc=daniel.thompson@linaro.org \
    --cc=meta-arm@lists.yoctoproject.org \
    --cc=pbarker@konsulko.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=sumit.garg@linaro.org \
    --cc=wmills@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.