https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106118
Bug ID: 106118
Summary: lto-plugin/lto-plugin.c: -pthread not passed to
AM_LDFLAGS
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Created attachment 53216
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53216&action=edit
move -pthread from LDFLAGS to AM_LDFLAGS (prior autoreconf)
Hi.
"lto-plugin: make claim_file_handler thread-safe" [1] uses LDFLAGS="-pthread"
at configure.ac. Unfortunately, LDFLAGS is not passed from configure to the
Makefile recipe that links liblto_plugin.la.
Perhaps just move -pthread to AM_LDFLAGS at Makefile.in? AC_CHECK_HEADER does
not use LDFLAGS anyway. It is implicitly used by other checks but I wonder if
that just makes things more misleading (a missing pthread library, that is).
Also, it seems that pretty much every library has a different way of checking
and setting -pthread, -lpthread et. al.
[1]
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=2669cae081c852bc8bde1647d671aa66930cc556