lto: pass -pthread to AM_LDFLAGS [PR 106118]
Commit Message
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(-)
Comments
On Tue, Jun 28, 2022 at 5:19 PM Pekka Seppänen <pexu@gcc.mail.kapsi.fi> wrote:
>
> Move -pthread from configure.ac to Makefile.in so that it is passed to
> AM_LDFLAGS.
OK
> 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
>
> OK
>
I've just pushed that as 51debf7f857.
Martin
@@ -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))
@@ -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"