Note after my fix, GCC LTO bootstrap still require binutils 2.34.x or newer due to https://sourceware.org/PR25355 . 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-bounces@lists.linaro.org on behalf of Andrew Pinski apinski@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_sh... 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-bounces@lists.linaro.org on behalf of Andrew Pinski apinski@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.kuvyrkov@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=Dw...
On 14 Sep 2021, at 07:47, ci_notify@linaro.org wrote:
Identified regression caused by *gcc:9e58de3ce00fc2385c9efb7faf321e0c601f0b0c*: commit 9e58de3ce00fc2385c9efb7faf321e0c601f0b0c Author: Andrew Pinski apinski@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-... Artifacts of first_bad build: https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-... Even more details: https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-...
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_toolchai...
# 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-... --fail curl -o artifacts/manifests/build-parameters.sh https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-... --fail curl -o artifacts/test.sh https://urldefense.proofpoint.com/v2/url?u=https-3A__ci.linaro.org_job_tcwg-... --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 <apinski@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_mailma... _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linaro.org_mailma...