On Thu, Jul 14, 2022 at 1:13 PM Martin Liška <mli...@suse.cz> wrote: > > On 7/14/22 12:10, Richard Biener wrote: > > On Thu, Jul 14, 2022 at 12:03 PM Martin Liška <mli...@suse.cz> wrote: > >> > >> On 7/13/22 14:15, Richard Biener wrote: > >>> Didn't we have it that way and not work? IIRC LDFLAGS is only > >>> used during configure link tests and _not_ substituted? > >> > >> You are right. > >> > >> There's a proper fix that utilizes AM_CONDITIONAL and sets LDFLAGS properly > >> in Makefile.am. > >> > >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > >> > >> Ready to be installed? > > > > I'm not really an expert on build issues but I'd have added > > some lto_plugin_extra_ldflags variable, AC_SUBST ()ed it > > and done > > > > AM_LDFLAGS = @lto_plugin_extra_ldflags@ @ac_lto_plugin_ldflags@ > > > > or figure where we set ac_lto_plugin_ldflags and amend that during > > configure instead: > > > > # Need -Wc to get it through libtool. > > if test "x$have_static_libgcc" = xyes; then > > ac_lto_plugin_ldflags="-Wc,-static-libgcc" > > fi > > AC_SUBST(ac_lto_plugin_ldflags) > > All right, so something like this?
LGTM with the changelog fixed > Martin > > > > > > >> Thanks, > >> Martin