mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Improve TLS detection for systems with compiler support but no libc support.
* acinclude.m4 (GUILE_THREAD_LOCAL_STORAGE): Use `AC_LINK_IFELSE' instead of `AC_COMPILE_IFELSE'.
This commit is contained in:
parent
d94dcf59c6
commit
96e15df109
1 changed files with 5 additions and 2 deletions
|
@ -341,8 +341,11 @@ dnl Check for compiler thread-local storage (TLS) support.
|
|||
AC_DEFUN([GUILE_THREAD_LOCAL_STORAGE], [
|
||||
AC_CACHE_CHECK([whether the `__thread' storage class is available],
|
||||
[ac_cv_have_thread_storage_class],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;],
|
||||
[tls_integer = 123;])],
|
||||
[dnl On some systems, e.g., NetBSD 5.0 with GCC 4.1, `__thread' is
|
||||
dnl properly compiled but fails to link due to the lack of TLS
|
||||
dnl support in the C library. Thus we try to link, not just compile.
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;],
|
||||
[tls_integer = 123;])],
|
||||
[ac_cv_have_thread_storage_class="yes"],
|
||||
[ac_cv_have_thread_storage_class="no"])])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue