Skip to content
Snippets Groups Projects
Commit 41130a65 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

RTS configure: Move over `__thread` check

This used by (@bgamari thinks) the `GCThread` abstraction in the RTS.

All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.

Progress towards #17191
parent b7df0732
No related branches found
No related tags found
No related merge requests found
......@@ -1046,19 +1046,6 @@ AC_CHECK_FUNCS([eventfd])
AC_CHECK_FUNCS([getpid getuid raise])
dnl ** Check for __thread support in the compiler
AC_MSG_CHECKING(for __thread support)
AC_COMPILE_IFELSE(
[ AC_LANG_SOURCE([[__thread int tester = 0;]]) ],
[
AC_MSG_RESULT(yes)
AC_DEFINE([CC_SUPPORTS_TLS],[1],[Define to 1 if __thread is supported])
],
[
AC_MSG_RESULT(no)
AC_DEFINE([CC_SUPPORTS_TLS],[0],[Define to 1 if __thread is supported])
])
GHC_ADJUSTORS_METHOD([Target])
AC_SUBST([UseLibffiForAdjustors])
......
......@@ -33,6 +33,19 @@ GHC_CONVERT_PLATFORM_PARTS([host], [Host])
FPTOOLS_SET_PLATFORM_VARS([host], [Host])
FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
dnl ** Check for __thread support in the compiler
AC_MSG_CHECKING(for __thread support)
AC_COMPILE_IFELSE(
[ AC_LANG_SOURCE([[__thread int tester = 0;]]) ],
[
AC_MSG_RESULT(yes)
AC_DEFINE([CC_SUPPORTS_TLS],[1],[Define to 1 if __thread is supported])
],
[
AC_MSG_RESULT(no)
AC_DEFINE([CC_SUPPORTS_TLS],[0],[Define to 1 if __thread is supported])
])
dnl large address space support (see rts/include/rts/storage/MBlock.h)
dnl
dnl Darwin has vm_allocate/vm_protect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment