diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-03-05 10:08:25 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-03-05 10:08:25 +0900 |
commit | 0600edaa5c1a04547bd6b1e0431660d6833074cd (patch) | |
tree | d099efc896b831b1046baf83d8ba3edb60c6e65c /m4/threadlib.m4 | |
parent | 4a9ac8023543db82c39c3db6138a8e8582f51797 (diff) | |
download | wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.tar.gz wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.tar.bz2 wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.zip |
Imported Upstream version 1.20.2upstream/1.20.2
Diffstat (limited to 'm4/threadlib.m4')
-rw-r--r-- | m4/threadlib.m4 | 84 |
1 files changed, 2 insertions, 82 deletions
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 index ed6ebd5..bfc3bac 100644 --- a/m4/threadlib.m4 +++ b/m4/threadlib.m4 @@ -1,5 +1,5 @@ -# threadlib.m4 serial 15 -dnl Copyright (C) 2005-2018 Free Software Foundation, Inc. +# threadlib.m4 serial 16 +dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -151,36 +151,6 @@ int main () *" -static "*) gl_cv_have_weak=no ;; esac ]) - dnl Check whether the linker supports the --as-needed/--no-as-needed options. - dnl Assume GCC, so that we can use the -Wl option. - AC_CACHE_CHECK([whether the linker supports --as-needed], - [gl_cv_linker_have_as_needed], - [if test -n "$GCC"; then - gl_saved_ldflags="$LDFLAGS" - LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [gl_cv_linker_have_as_needed=yes], - [gl_cv_linker_have_as_needed=no]) - LDFLAGS="$gl_saved_ldflags" - else - gl_cv_linker_have_as_needed=no - fi - ]) - dnl Check whether the linker supports the --push-state/--pop-state options. - dnl Assume GCC, so that we can use the -Wl option. - AC_CACHE_CHECK([whether the linker supports --push-state], - [gl_cv_linker_have_push_state], - [if test -n "$GCC"; then - gl_saved_ldflags="$LDFLAGS" - LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [gl_cv_linker_have_push_state=yes], - [gl_cv_linker_have_push_state=no]) - LDFLAGS="$gl_saved_ldflags" - else - gl_cv_linker_have_push_state=no - fi - ]) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. @@ -259,32 +229,6 @@ int main () [Define if references to the POSIX multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= - dnl On platforms where GCC enables --as-needed by default, attempt - dnl to make sure that LIBMULTITHREAD really links with -lpthread. - dnl Otherwise linking with LIBMULTITHREAD has no effect; then - dnl the weak symbols are not defined and thus evaluate to NULL. - case "$LIBMULTITHREAD" in - "") ;; - -pthread) - if test $gl_cv_linker_have_as_needed = yes; then - if test $gl_cv_linker_have_push_state = yes; then - LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state" - else - LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread" - fi - fi - ;; - *) - if test $gl_cv_linker_have_as_needed = yes; then - if test $gl_cv_linker_have_push_state = yes; then - LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" - else - LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" - fi - fi - ;; - esac - # TODO: May need to modify LTLIBMULTITHREAD similarly. fi fi fi @@ -317,18 +261,6 @@ int main () [Define if references to the old Solaris multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= - dnl On platforms where GCC enables --as-needed by default, attempt - dnl to make sure that LIBMULTITHREAD really links with -lthread. - dnl Otherwise linking with LIBMULTITHREAD has no effect; then - dnl the weak symbols are not defined and thus evaluate to NULL. - if test $gl_cv_linker_have_as_needed = yes; then - if test $gl_cv_linker_have_push_state = yes; then - LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" - else - LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" - fi - fi - # TODO: May need to modify LTLIBMULTITHREAD similarly. fi fi fi @@ -357,18 +289,6 @@ int main () [Define if references to the GNU Pth multithreading library should be made weak.]) LIBTHREAD= LTLIBTHREAD= - dnl On platforms where GCC enables --as-needed by default, attempt - dnl to make sure that LIBMULTITHREAD really links with -lpth. - dnl Otherwise linking with LIBMULTITHREAD has no effect; then - dnl the weak symbols are not defined and thus evaluate to NULL. - if test $gl_cv_linker_have_as_needed = yes; then - if test $gl_cv_linker_have_push_state = yes; then - LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state" - else - LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD" - fi - fi - # TODO: May need to modify LTLIBMULTITHREAD similarly. fi fi else |