public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] lto: pass -pthread to AM_LDFLAGS [PR 106118]
@ 2022-06-28 14:14 Pekka Seppänen
  2022-06-29  9:43 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Pekka Seppänen @ 2022-06-28 14:14 UTC (permalink / raw)
  To: gcc-patches

Move -pthread from configure.ac to Makefile.in so that it is passed to 
AM_LDFLAGS.

lto-plugin/ChangeLog:

	* configure.ac: Move -pthread from here...
	* Makefile.am: ...to here.
	* configure: Regenerate.
	* Makefile.in: Likewise.
---
  lto-plugin/Makefile.am  | 3 ++-
  lto-plugin/configure.ac | 3 ---
  2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index a96acc87ee2..81362eafc36 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -9,7 +9,8 @@ libexecsubdir := 
$(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(a

  AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
  AM_CFLAGS = @ac_lto_plugin_warn_cflags@ $(CET_HOST_FLAGS)
-AM_LDFLAGS = @ac_lto_plugin_ldflags@
+# The plug-in depends on pthreads.
+AM_LDFLAGS = -pthread @ac_lto_plugin_ldflags@
  AM_LIBTOOLFLAGS = --tag=disable-static
  override CFLAGS := $(filter-out -fsanitize=address 
-fsanitize=hwaddress,$(CFLAGS))
  override LDFLAGS := $(filter-out -fsanitize=address 
-fsanitize=hwaddress,$(LDFLAGS))
diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac
index 75cf46ac5c7..c2ec512880f 100644
--- a/lto-plugin/configure.ac
+++ b/lto-plugin/configure.ac
@@ -13,9 +13,6 @@ AC_PROG_CC
  AC_SYS_LARGEFILE
  ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])

-# The plug-in depends on pthreads
-LDFLAGS="-pthread"
-
  # Check whether -static-libgcc is supported.
  saved_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS -static-libgcc"
-- 
2.34.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-01  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 14:14 [PATCH] lto: pass -pthread to AM_LDFLAGS [PR 106118] Pekka Seppänen
2022-06-29  9:43 ` Richard Biener
2022-07-01  7:02   ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).