Hi Andrew,
Your patch breaks LTO bootstrap for, at least, ARM and AArch64. Would you please investigate?
-- Maxim Kuvyrkov https://www.linaro.org
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://ci.linaro.org/job/tcwg_gcc_bootstrap-bisect-master-aarch64-bootstrap... Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-bisect-master-aarch64-bootstrap... Even more details: https://ci.linaro.org/job/tcwg_gcc_bootstrap-bisect-master-aarch64-bootstrap...
Reproduce builds:
<cut> mkdir investigate-gcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c cd investigate-gcc-9e58de3ce00fc2385c9efb7faf321e0c601f0b0c
# Fetch scripts git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests and test.sh script mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-bisect-master-aarch64-bootstrap... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-bisect-master-aarch64-bootstrap... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-bisect-master-aarch64-bootstrap... --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>