diff options
author | Martin Liska <mliska@suse.cz> | 2022-07-14 09:51:33 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-07-14 13:26:21 +0200 |
commit | 29f40a8047fa9b6ccde2174ca126b78a535e1a61 (patch) | |
tree | 2cc86628d3374288c99cec8bf729f7cedce24998 /lto-plugin/configure | |
parent | b0f02eeb906b6351099ac97066ef74b6167d9ecb (diff) | |
download | gcc-29f40a8047fa9b6ccde2174ca126b78a535e1a61.tar.gz |
lto-plugin: use -pthread only for detected targets
Use -pthread only if we are going to use pthread functionality.
PR bootstrap/106156
lto-plugin/ChangeLog:
* Makefile.am: Use ac_lto_plugin_extra_ldflags for AM_LDFLAGS.
* configure.ac: Use AC_SUBST(ac_lto_plugin_extra_ldflags).
* Makefile.in: Regenerate.
* configure: Regenerate.
Diffstat (limited to 'lto-plugin/configure')
-rwxr-xr-x | lto-plugin/configure | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lto-plugin/configure b/lto-plugin/configure index 870e49b2e62..fdb8a5964b4 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -650,6 +650,7 @@ LD FGREP SED LIBTOOL +ac_lto_plugin_extra_ldflags LTO_PLUGIN_USE_SYMVER_SUN_FALSE LTO_PLUGIN_USE_SYMVER_SUN_TRUE LTO_PLUGIN_USE_SYMVER_GNU_FALSE @@ -6012,6 +6013,7 @@ fi # Check for thread headers. use_locking=no +ac_lto_plugin_extra_ldflags= case $target in riscv*) @@ -6031,8 +6033,12 @@ $as_echo "#define HAVE_PTHREAD_LOCKING 1" >>confdefs.h fi + + ac_lto_plugin_extra_ldflags="-pthread" fi + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -12104,7 +12110,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12107 "configure" +#line 12113 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12210,7 +12216,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12213 "configure" +#line 12219 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |