Matthias Klose <d...@ubuntu.com> writes: > > I checked that with a profiled lto build. The build succeeds with the > attached > patch to respect the parallel linking limitations, which you can configure > with > --enable-link-serialization=N > > However the build fails in the installation step with: > > [...] > Linking stage1/m2/cc1gm2 |>>>>>>>>>>>>>>>>-- | 0% > x86_64-linux-gnu-g++-10 -std=c++11 -no-pie -g -O2 -DIN_GCC -W -Wall > -Wno-narrowing -Wwrite-strings -Wcast-q > ual -Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes > -Wno-error=format-diag -Wold-style-definition -Wc++-compat - > fno-common -DHAVE_CONFIG_H -o stage1/m2/cc1gm2 m2/gm2-lang.o > m2/stor-layout.o > m2/m2pp.o m2/gm2-gcc/m2assert.o m2/gm2-gcc/m2block.o m2/gm2-gcc/m2builtins.o > m2/gm2-gcc/m2except.o m2/gm2-gcc/m2convert.o m2/gm2-gcc/m2color.o > m2/gm2-gcc/m2decl.o m2/gm2-gcc/m2expr.o m2/gm2-gcc/m2linemap.o > m2/gm2-gcc/m2statement.o m2/gm2-gcc/m2type.o m2/gm2-gcc/m2tree.o > m2/gm2-gcc/m2treelib.o m2/gm2-gcc/m2top.o m2/gm2-gcc/m2misc.o > m2/gm2-gcc/init.o > m2/gm2-compiler-boot/m2flex.o \ > attribs.o \ > m2/gm2-compiler-boot/gm2.a > m2/gm2-libs-boot/libgm2.a m2/mc-boot-ch/Glibc.o m2/mc-boot-ch/Gmcrts.o > m2/gm2-gcc/rtegraph.o \ > libbackend.a main.o libcommon-target.a > libcommon.a > ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a > ../libcpp/libcpp.a > ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a > ../libdecnumber/libdecnumber.a -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl -lz > -lzstd > lto1: fatal error: bytecode stream in file 'm2/gm2-compiler-boot/m2flex.o' > generated with LTO version 12.0 instead of the expected 9.2 > compilation terminated. > lto-wrapper: fatal error: x86_64-linux-gnu-g++-10 returned 1 exit status > compilation terminated. > /usr/bin/ld: error: lto-wrapper failed > collect2: error: ld returned 1 exit status > Command exited with non-zero status 1 > > x86_64-linux-gnu-g++-10 is the compiler used for the bootstrap. I haven't > checked if that is also seen for a normal bootstrap. Apparently it tries to > re-bootstrap the compiler. > > The build is configured with --with-build-config=bootstrap-lto-lean, built > with > make profiledbootstrap-lean
Hi Matthias, thanks for the patch - I will re-examine the install - there is definitely something odd going on. On one of my machines it always wants to rebuild gcc/m2/gm2-lang.o and falls over and on another (same release - same gcc version 6.3.0 20170516 - debian stretch) it succeeds. Thanks for the tips on --enable-link-serialization=N, regards, Gaius