[PATCH] lto-plugin: use -pthread only for detected targets

Richard Biener richard.guenther@gmail.com
Thu Jul 14 10:10:57 GMT 2022

On Thu, Jul 14, 2022 at 12:03 PM Martin Liška <mliska@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

> Thanks,
> Martin

More information about the Gcc-patches mailing list