aboutsummaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorPekka Seppänen <pexu@gcc.mail.kapsi.fi>2022-06-28 17:14:09 +0300
committerMartin Liska <mliska@suse.cz>2022-07-01 09:01:48 +0200
commit51debf7f857dddfb4dd2493867d2648041e7d8de (patch)
treeef6f2b7c902cce426c491ae31282a0f1c2097edd /lto-plugin
parent9701432ff79926a5dd3303be3417e0bd0c24140b (diff)
downloadgcc-51debf7f857dddfb4dd2493867d2648041e7d8de.zip
gcc-51debf7f857dddfb4dd2493867d2648041e7d8de.tar.gz
gcc-51debf7f857dddfb4dd2493867d2648041e7d8de.tar.bz2
lto: pass -pthread to AM_LDFLAGS [PR 106118]
Move -pthread from configure.ac to Makefile.in so that it is passed to AM_LDFLAGS. PR lto/106118 lto-plugin/ChangeLog: * configure.ac: Move -pthread from here... * Makefile.am: ...to here. * configure: Regenerate. * Makefile.in: Likewise.
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/Makefile.am3
-rw-r--r--lto-plugin/Makefile.in3
-rwxr-xr-xlto-plugin/configure7
-rw-r--r--lto-plugin/configure.ac3
4 files changed, 6 insertions, 10 deletions
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index a96acc8..81362ea 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/Makefile.in b/lto-plugin/Makefile.in
index 5debcb2..2033dd9 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -344,7 +344,8 @@ gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
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
libexecsub_LTLIBRARIES = liblto_plugin.la
in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
diff --git a/lto-plugin/configure b/lto-plugin/configure
index 7d2f1ad..aaa91a6 100755
--- a/lto-plugin/configure
+++ b/lto-plugin/configure
@@ -5643,9 +5643,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# The plug-in depends on pthreads
-LDFLAGS="-pthread"
-
# Check whether -static-libgcc is supported.
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -static-libgcc"
@@ -12094,7 +12091,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12097 "configure"
+#line 12094 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12200,7 +12197,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12203 "configure"
+#line 12200 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac
index 75cf46a..c2ec512 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"