Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579731.html

Note you might need to use a newer binutils too.  I did not check your CI to 
see which one is being used.  There is no workaround for that really as 
binutils was broken for LTO usage before 2.34.x really; just did not show up in 
GCC bootstrap until my patches.

Thanks,
Andrew Pinski

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Andrew Pinski <apin...@marvell.com>
Sent: Friday, September 17, 2021 2:36 PM
To: Maxim Kuvyrkov
Cc: linaro-toolchain
Subject: Re: [EXT] Re: [TCWG CI] Regression caused by 
gcc:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c

Note after my fix, GCC LTO bootstrap still require binutils 2.34.x or newer due 
to 
https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceware.org_PR25355&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=CypK0FR0CtShzL1lK3c3KCOLxpXdxkCUmNEHR5wjZqA&s=B9ouXR9Jz4aE8FJMzBU3XAMQq6ogjtCp7fGkaWsL8RU&e=
  .  There is nothing I can workaround in gcc's configure as this is a standard 
test for libtool.  I will be updating the installation documentation anyways as 
it was already required for GCC 10+ LTO usage.

Thanks,
Andrew

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Andrew Pinski <apin...@marvell.com>
Sent: Friday, September 17, 2021 12:17 PM
To: Maxim Kuvyrkov
Cc: linaro-toolchain
Subject: Re: [EXT] Re: [TCWG CI] Regression caused by 
gcc:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c

I filed 
https://urldefense.proofpoint.com/v2/url?u=https-3A__gcc.gnu.org_bugzilla_show-5Fbug.cgi-3Fid-3D102389&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=Z53mMckaaPVukepRcIaw4xVIwXo-KDDbyBppjLpmKAk&s=Q3qArRvwVluXYGNnVgBFS0O2bkiidfkh24LUINvSvlQ&e=
  for the problem.
I will look into fixing it either later today or tomorrow.  It might just need 
to export nm and such.

________________________________________
From: linaro-toolchain <linaro-toolchain-boun...@lists.linaro.org> on behalf of 
Andrew Pinski <apin...@marvell.com>
Sent: Friday, September 17, 2021 10:31 AM
To: Maxim Kuvyrkov
Cc: linaro-toolchain
Subject: Re: [EXT] Re: [TCWG CI] Regression caused by 
gcc:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c


00:09:17 ./libtool: eval: line 1118: `nm  .libs/lto-plugin.o   |  | 
/usr/bin/sed 's/.* //' | sort | uniq > .libs/liblto_plugin.exp'

Normally it does:
libtool: link: nm  .libs/lto-plugin.o   | sed -n -e 's/^.*[      
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      
]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | /bin/sed 's/.* //' | sort | uniq > 
.libs/liblto_plugin.exp

hmm, looks like there is a bad interaction with libtool's configure and LTO. I 
have some ideas on how to fix the problem but this was a latent bug ...

Thanks,
Andrew

________________________________________
From: Maxim Kuvyrkov <maxim.kuvyr...@linaro.org>
Sent: Friday, September 17, 2021 2:30 AM
To: Andrew Pinski
Cc: linaro-toolchain
Subject: [EXT] Re: [TCWG CI] Regression caused by 
gcc:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c

External Email

----------------------------------------------------------------------
Hi Andrew,

Your patch breaks LTO bootstrap for, at least, ARM and AArch64.  Would you 
please investigate?

--
Maxim Kuvyrkov
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linaro.org&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=QnMDg_A7aZW0wc3v1iApGji3BpEeC8n9XICbBwPWUrM&e=

> On 14 Sep 2021, at 07:47, ci_not...@linaro.org wrote:
>
> Identified regression caused by 
> *gcc:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c*:
> commit 9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
> Author: Andrew Pinski <apin...@marvell.com>
>
>    Fix PR lto/49664: liblto_plugin.so exports too many symbols
>
> Results regressed to (for first_bad == 
> 9e58de3ce00fc2385c9efb7faf321e0c601f0b0c)
> # reset_artifacts:
> -10
> # true:
> 0
> # build_abe binutils:
> 1
> # First few build errors in logs:
>
> from (for last_good == 512b383534785f9fc021e700a1fdda86cf0f3fe7)
> # reset_artifacts:
> -10
> # true:
> 0
> # build_abe binutils:
> 1
> # build_abe bootstrap_lto:
> 2
>
> This commit has regressed these CI configurations:
> - tcwg_gcc_bootstrap/master-aarch64-bootstrap_lto
>
> Artifacts of last_good build: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fgcc-5Fbootstrap-2Dbisect-2Dmaster-2Daarch64-2Dbootstrap-5Flto_2_artifact_artifacts_build-2D512b383534785f9fc021e700a1fdda86cf0f3fe7_&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=HUZDvrwHuXvfpYKnCjP1tXiGpuF_E6mFNUKityzYtHg&e=
> Artifacts of first_bad build: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fgcc-5Fbootstrap-2Dbisect-2Dmaster-2Daarch64-2Dbootstrap-5Flto_2_artifact_artifacts_build-2D9e58de3ce00fc2385c9efb7faf321e0c601f0b0c_&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=phj2FAY_lzN8lgQbhq8TKk9864PnS3gQGKsPhUxN01c&e=
> Even more details: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fgcc-5Fbootstrap-2Dbisect-2Dmaster-2Daarch64-2Dbootstrap-5Flto_2_artifact_artifacts_&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=OdF1p17aCB56T-oqonmUO9PP-m7LCzs4I4Q_u7Wb6cI&e=
>
> Reproduce builds:
> <cut>
> mkdir investigate-gcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
> cd investigate-gcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
>
> # Fetch scripts
> git clone 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__git.linaro.org_toolchain_jenkins-2Dscripts&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=vzLdO8_Ciek8K3tfiCJyT6VFg7jbg4N5ItqlnRRnl-I&e=
>
> # Fetch manifests and test.sh script
> mkdir -p artifacts/manifests
> curl -o artifacts/manifests/build-baseline.sh 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fgcc-5Fbootstrap-2Dbisect-2Dmaster-2Daarch64-2Dbootstrap-5Flto_2_artifact_artifacts_manifests_build-2Dbaseline.sh&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=ZJgkfcxECPeYmjnqlm9G6SLIlwtdqPLwFn_z6VNSMmA&e=
>   --fail
> curl -o artifacts/manifests/build-parameters.sh 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fgcc-5Fbootstrap-2Dbisect-2Dmaster-2Daarch64-2Dbootstrap-5Flto_2_artifact_artifacts_manifests_build-2Dparameters.sh&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=E1KQ-1iX-nQoLoWnaWOxWAVb8vkG9h1fnCO8to5jjkY&e=
>   --fail
> curl -o artifacts/test.sh 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-5Fgcc-5Fbootstrap-2Dbisect-2Dmaster-2Daarch64-2Dbootstrap-5Flto_2_artifact_artifacts_test.sh&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=s41u8chBfYsqVyM9FqlpVfArAGU4u6rRdD-Sx3V7c2s&s=qP7b2soUj4xguj7oURgUIWh-NPYXTWEGM5eIAEamgCQ&e=
>   --fail
> chmod +x artifacts/test.sh
>
> # Reproduce the baseline build (build all pre-requisites)
> ./jenkins-scripts/tcwg_gnu-build.sh @@ artifacts/manifests/build-baseline.sh
>
> # Save baseline build state (which is then restored in artifacts/test.sh)
> mkdir -p ./bisect
> rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ 
> --exclude /gcc/ ./ ./bisect/baseline/
>
> cd gcc
>
> # Reproduce first_bad build
> git checkout --detach 9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
> ../artifacts/test.sh
>
> # Reproduce last_good build
> git checkout --detach 512b383534785f9fc021e700a1fdda86cf0f3fe7
> ../artifacts/test.sh
>
> cd ..
> </cut>
>
> Full commit (up to 1000 lines):
> <cut>
> commit 9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
> Author: Andrew Pinski <apin...@marvell.com>
> Date:   Sun Sep 12 08:58:16 2021 +0000
>
>    Fix PR lto/49664: liblto_plugin.so exports too many symbols
>
>    So right now liblto_plugin.so exports many libiberty symbols and
>    simple_object file symbols but really it just needs to export onload.
>
>    This fixes the problem by using "-export-symbols-regex onload" on
>    the libtool link line.
>
>    lto-plugin/ChangeLog:
>
>            PR lto/49664
>            * Makefile.am: Export only onload.
>            * Makefile.in: Regenerate.
> ---
> lto-plugin/Makefile.am | 3 ++-
> lto-plugin/Makefile.in | 7 ++++---
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
> index 8b20e1d1d87..988d7a78294 100644
> --- a/lto-plugin/Makefile.am
> +++ b/lto-plugin/Makefile.am
> @@ -21,7 +21,8 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), 
> $(gcc_build_dir)/$(lib))
> liblto_plugin_la_SOURCES = lto-plugin.c
> # Note that we intentionally override the bindir supplied by 
> ACX_LT_HOST_FLAGS.
> liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
> -     $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir)
> +     $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
> +     -export-symbols-regex onload
> # Can be simplified when libiberty becomes a normal convenience library.
> libiberty = $(with_libiberty)/libiberty.a
> libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
> diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
> index 20611c6b1e6..f8df31bb1e8 100644
> --- a/lto-plugin/Makefile.in
> +++ b/lto-plugin/Makefile.in
> @@ -323,6 +323,7 @@ prefix = @prefix@
> program_transform_name = @program_transform_name@
> psdir = @psdir@
> real_target_noncanonical = @real_target_noncanonical@
> +runstatedir = @runstatedir@
> sbindir = @sbindir@
> sharedstatedir = @sharedstatedir@
> srcdir = @srcdir@
> @@ -350,9 +351,9 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
> in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), 
> $(gcc_build_dir)/$(lib))
> liblto_plugin_la_SOURCES = lto-plugin.c
> # Note that we intentionally override the bindir supplied by 
> ACX_LT_HOST_FLAGS.
> -liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module 
> -avoid-version \
> -     -bindir $(libexecsubdir) $(if $(wildcard \
> -     $(libiberty_noasan)),, $(if $(wildcard \
> +liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \
> +     -avoid-version -bindir $(libexecsubdir) -export-symbols-regex \
> +     onload $(if $(wildcard $(libiberty_noasan)),, $(if $(wildcard \
>       $(libiberty_pic)),,-Wc,$(libiberty)))
> # Can be simplified when libiberty becomes a normal convenience library.
> libiberty = $(with_libiberty)/libiberty.a
> </cut>

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=VBiKaWpuhy9BEfiouNMQaX0Hz6zV3NQDJ2MhJksLKIw&s=7-AF_5shUREitJ_u7mgBIRneWhyVTTKiIv5OBICm0nw&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=Z53mMckaaPVukepRcIaw4xVIwXo-KDDbyBppjLpmKAk&s=OdJUacn9MtOxhL6_0PnKHbkaJnsBtr-soH6mVLv7cvQ&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailman_listinfo_linaro-2Dtoolchain&d=DwICAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=L_uAQMgirzaBwiEk05NHY-AMcNfJzugOS_xTjrtS94k&m=CypK0FR0CtShzL1lK3c3KCOLxpXdxkCUmNEHR5wjZqA&s=1pvoeTWgXeVXw6QCrK8jOw7LM3IDu3s7hSKVLYapumQ&e=
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to