https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119215
--- Comment #26 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to James K. Lowden from comment #25)
> I overstated the case; I never successfully built cobol1 with lto.
>
> $ head build-lto/config.log | sed -Ene "/[/]config/ s:${PWD}:...:gp" && grep
> cannot build-lto/libdecnumber/config.log
>
> $ .../configure --prefix=/tmp/gcc/lto --with-build-config=bootstrap-lto
> --enable-plugin --with-linker-plugin --disable-multilib
> --enable-languages=cobol
> xgcc: fatal error: cannot execute 'lto1': posix_spawnp: No such file or
> directory
> configure:2789: error: C compiler cannot create executables
>
Does --enable-lto help? It's the default but I'm not sure how it interacts
with your --enable-languages= (where you can also pass lto).