From: "Pekka Seppänen" <pexu@gcc.mail.kapsi.fi>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] lto: pass -pthread to AM_LDFLAGS [PR 106118]
Date: Tue, 28 Jun 2022 17:14:09 +0300 [thread overview]
Message-ID: <ef356495367df69b6e756c75132d3669@gcc.mail.kapsi.fi> (raw)
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
next reply other threads:[~2022-06-28 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 14:14 Pekka Seppänen [this message]
2022-06-29 9:43 ` Richard Biener
2022-07-01 7:02 ` Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef356495367df69b6e756c75132d3669@gcc.mail.kapsi.fi \
--to=pexu@gcc.mail.kapsi.fi \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).