1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

Explicitly disable TLS on NetBSD 5.0.

* acinclude.m4 (GUILE_THREAD_LOCAL_STORAGE): Explicitly disable TLS on
  NetBSD 5.0.
This commit is contained in:
Ludovic Courtès 2009-11-14 16:50:38 +01:00
parent f8a1c9a859
commit 0ee42e27d5

View file

@ -343,11 +343,22 @@ AC_DEFUN([GUILE_THREAD_LOCAL_STORAGE], [
[ac_cv_have_thread_storage_class], [ac_cv_have_thread_storage_class],
[dnl On some systems, e.g., NetBSD 5.0 with GCC 4.1, `__thread' is [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 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. dnl support in the C library. Thus we try to link, not just
dnl compile. Unfortunately, this test is not enough, so we
dnl explicitly check for known-broken systems. See
dnl http://lists.gnu.org/archive/html/guile-devel/2009-10/msg00138.html
dnl for details.
case "x$enable_shared--$host" in
xyes--*netbsd[0-5].[0-9])
ac_cv_have_thread_storage_class="no"
;;
*)
AC_LINK_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;], AC_LINK_IFELSE([AC_LANG_PROGRAM([__thread int tls_integer;],
[tls_integer = 123;])], [tls_integer = 123;])],
[ac_cv_have_thread_storage_class="yes"], [ac_cv_have_thread_storage_class="yes"],
[ac_cv_have_thread_storage_class="no"])]) [ac_cv_have_thread_storage_class="no"])
;;
esac])
if test "x$ac_cv_have_thread_storage_class" = "xyes"; then if test "x$ac_cv_have_thread_storage_class" = "xyes"; then
SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS=1 SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS=1