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/Makefile.in b/lto-plugin/Makefile.in index 5debcb21b66..2033dd9b7c2 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 7d2f1ad308c..aaa91a63623 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 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"