All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: Ross Burton <Ross.Burton@arm.com>,
	"meta-arm@lists.yoctoproject.org"
	<meta-arm@lists.yoctoproject.org>, Jon Mason <Jon.Mason@arm.com>,
	"daniel.thompson@linaro.org" <daniel.thompson@linaro.org>
Subject: Re: [PATCH v2 2/2] external-arm-toolchain: Add support for Arm GCC 11.2 binary release
Date: Tue, 3 May 2022 11:24:17 -0400	[thread overview]
Message-ID: <20220503152417.GX9834@denix.org> (raw)
In-Reply-To: <CAFA6WYNyUPk4a4yXMSgtPMyoLH=Cp7vCcgk0db_w=A4Sooq_7Q@mail.gmail.com>

On Tue, May 03, 2022 at 06:07:41PM +0530, Sumit Garg wrote:
> Hi Ross,
> 
> On Tue, 3 May 2022 at 14:57, Ross Burton <Ross.Burton@arm.com> wrote:
> >
> > We might need to temporarily revert this, as the binaries contain instructions that are only available in Broadwell cores.
> 
> Okay I see. But I don't think we need a revert here since the binary
> toolchain recipe isn't just tied to 11.2 but rather supports all the
> prior binary toolchain releases as well. So it's just a framework
> improvement which should work with the upcoming release as well.
> 
> >
> > Specifically, our CI explodes, for example:
> 
> If we need our CI to stop using 11.2 then that can be reverted to use
> 10.3 instead via a separate patch.

I agree here - should probably keep the recipe update, which is 
version-agnostic, but switch CI back to 10.3 for now. Thanks.


> > ../../micropython/py/formatfloat.c:105:5: internal compiler error: Illegal instruction
> >   105 |     MICROPY_FLOAT_CONST(1e32), MICROPY_FLOAT_CONST(1e16), MICROPY_FLOAT_CONST(1e8), MICROPY_FLOAT_CONST(1e4), MICROPY_FLOAT_CONST(1e2), MICROPY_FLOAT_CONST(1e1)
> >       |     ^~~~~~~~~~~~~~~~~~~
> > 0x1521b50 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
> >         ???:0
> > 0x15227d6 internal_error(char const*, ...)
> >         ???:0
> > 0xb7838f crash_signal(int)
> >         ???:0
> > 0x171b592 __gmpn_mul_basecase
> >         ???:0
> >
> > There’s an internal ticket and the next release will be fixed.
> >
> > Ross
> >
> > > On 29 Apr 2022, at 07:21, Sumit Garg <sumit.garg@linaro.org> wrote:
> > >
> > > Arm GCC 11.2 binary release has completely changed the way how libc was
> > > packaged in earlier binary releases. So adjust do_install() accordingly
> > > to support Arm GCC 11.2 as well as earlier binary releases.
> > >
> > > Along with this update CI as well to point at Arm GCC 11.2 binary
> > > releases.
> > >
> > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > ---
> > >
> > > Changes in v2:
> > > - None
> > >
> > > ci/get-binary-toolchains                      | 10 ++--
> > > .../external-arm-toolchain.bb                 | 47 ++++++++-----------
> > > 2 files changed, 25 insertions(+), 32 deletions(-)
> > >
> > > diff --git a/ci/get-binary-toolchains b/ci/get-binary-toolchains
> > > index 838342a..bfdd8c5 100755
> > > --- a/ci/get-binary-toolchains
> > > +++ b/ci/get-binary-toolchains
> > > @@ -2,7 +2,7 @@
> > > set -u
> > >
> > > HOST_ARCH=$(uname -m)
> > > -VER="10.3-2021.07"
> > > +VER="11.2-2022.02"
> > >
> > > DOWNLOAD_DIR=$1
> > > TOOLCHAIN_DIR=$2
> > > @@ -15,18 +15,18 @@ if [ $HOST_ARCH = "aarch64" ]; then
> > >       #AArch64 Linux hosted cross compilers
> > >
> > >       #AArch32 target with hard float (arm-none-linux-gnueabihf)
> > > -     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
> > > +     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
> > > elif [ $HOST_ARCH = "x86_64" ]; then
> > >       #x86_64 Linux hosted cross compilers
> > >
> > >       #AArch32 target with hard float (arm-linux-none-gnueabihf)
> > > -     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
> > > +     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
> > >
> > >       #AArch64 GNU/Linux target (aarch64-none-linux-gnu)
> > > -     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
> > > +     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
> > >
> > >       #AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
> > > -     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
> > > +     wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
> > > else
> > >       echo "ERROR - Unknown build arch of $HOST_ARCH"
> > >       exit 1
> > > 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 a58eeb4..dcc8ebf 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
> > > @@ -79,29 +79,10 @@ do_install() {
> > >
> > >       CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
> > >       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/*  ${D}${base_libdir}
> > > -     if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then
> > > -             cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS}/*  ${D}${base_libdir}
> > > -     else
> > > -             if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
> > > -                     cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/*  ${D}${base_libdir}
> > > -             else
> > > -                     cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*.so*  ${D}${base_libdir}
> > > -             fi
> > > -     fi
> > > -     if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then
> > > -             cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}/*  ${D}${libdir}
> > > -     else
> > > -             cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*  ${D}${libdir}
> > > -             if [ ! -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
> > > -                     rm -rf ${D}${libdir}/*.so*
> > > -             fi
> > > -     fi
> > > +     cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/*  ${D}${base_libdir}
> > > +     cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*  ${D}${libdir}
> > >       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/share/*  ${D}${datadir}
> > >       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/*  ${D}${includedir}
> > > -     if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/${EAT_TARGET_SYS} ]; then
> > > -             cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/${EAT_TARGET_SYS}/*  ${D}${includedir}
> > > -             rm -r ${D}${includedir}/${EAT_TARGET_SYS}
> > > -     fi
> > >
> > >       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir}
> > >       if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then
> > > @@ -128,7 +109,11 @@ do_install() {
> > >
> > >       # 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}
> > > +     if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
> > > +             ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name}
> > > +     else
> > > +             cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib/${linker_name} ${D}${base_libdir}/
> > > +     fi
> > >       ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so
> > >       ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so
> > >       ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so
> > > @@ -144,6 +129,7 @@ do_install() {
> > >       ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so
> > >       ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so
> > >       ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so
> > > +     ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so
> > >
> > >       # remove potential .so duplicates from base_libdir
> > >       # for all symlinks created above in libdir
> > > @@ -164,7 +150,7 @@ do_install() {
> > >       rm -f ${D}${base_libdir}/libm.so
> > >
> > >       # Move these completely to ${libdir} and delete duplicates in ${base_libdir}
> > > -     for lib in asan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do
> > > +     for lib in asan hwasan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do
> > >               if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then
> > >                       mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir}
> > >               fi
> > > @@ -180,6 +166,10 @@ do_install() {
> > >       # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so
> > >       # Only remove them if both are regular files and are identical
> > >       for i in ${D}${base_libdir}/lib*-${EAT_VER_LIBC}.so; do
> > > +             if [ ! -e $i ] ; then
> > > +                     continue
> > > +             fi
> > > +
> > >               f=$(echo $i | sed 's/-${EAT_VER_LIBC}//')
> > >               l=$(ls $f.*)
> > >               if [ $(readlink -f $i ) = $l ]; then
> > > @@ -217,9 +207,9 @@ do_install() {
> > >       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
> > > +             sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so
> > >               if [ -f ${D}${base_libdir}/libc.so.6 ]; then
> > > -                     sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
> > > +                     sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
> > >               fi
> > >       fi
> > >
> > > @@ -460,13 +450,16 @@ FILES:libgfortran-staticdev = "${libdir}/libgfortran.a"
> > >
> > > # From gcc-sanitizers.inc:
> > >
> > > -FILES:libasan += "${libdir}/libasan.so.*"
> > > +FILES:libasan += "${libdir}/libasan.so.* ${libdir}/libhwasan.so.*"
> > > FILES:libasan-dev += "\
> > >     ${libdir}/libasan_preinit.o \
> > >     ${libdir}/libasan.so \
> > > +    ${libdir}/libhwasan.so \
> > >     ${libdir}/libasan.la \
> > > "
> > > -FILES:libasan-staticdev += "${libdir}/libasan.a"
> > > +FILES:libasan-staticdev += "${libdir}/libasan.a \
> > > +    ${libdir}/libhwasan.a \
> > > +"
> > >
> > > FILES:libubsan += "${libdir}/libubsan.so.*"
> > > FILES:libubsan-dev += "\
> > > --
> > > 2.25.1
> > >
> >
> 


  reply	other threads:[~2022-05-03 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  6:21 [PATCH v2 1/2] external-arm-toolchain-versions: Use ldd to get libc version Sumit Garg
2022-04-29  6:21 ` [PATCH v2 2/2] external-arm-toolchain: Add support for Arm GCC 11.2 binary release Sumit Garg
2022-04-29 16:10   ` Denys Dmytriyenko
2022-05-03  9:27   ` Ross Burton
2022-05-03 12:37     ` Sumit Garg
2022-05-03 15:24       ` Denys Dmytriyenko [this message]
2022-04-29 16:08 ` [PATCH v2 1/2] external-arm-toolchain-versions: Use ldd to get libc version Denys Dmytriyenko

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=20220503152417.GX9834@denix.org \
    --to=denis@denix.org \
    --cc=Jon.Mason@arm.com \
    --cc=Ross.Burton@arm.com \
    --cc=daniel.thompson@linaro.org \
    --cc=meta-arm@lists.yoctoproject.org \
    --cc=sumit.garg@linaro.org \
    /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.