From 5a88eb87265ab500347a22f3969195246d5f5358 Mon Sep 17 00:00:00 2001 From: jiez Date: Fri, 23 Jan 2009 04:58:03 +0000 Subject: libmudflap/ * mf-impl.h (__mf_get_state, __mf_set_state): Don't use __thread when TLS support is emulated. * mf-hooks3.c (__mf_get_state, __mf_set_state): Likewise. * mf-runtime.c (__mf_state_1): Likewise. * configure.ac: Use GCC_CHECK_EMUTLS. * configure: Regenerate. * config.h.in: Regenerate. config/ * tls.m4 (GCC_CHECK_EMUTLS): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143583 138bc75d-0d04-0410-961f-82ee72b054a4 --- libmudflap/configure | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'libmudflap/configure') diff --git a/libmudflap/configure b/libmudflap/configure index ad10a2c238d..758ac8f0a30 100755 --- a/libmudflap/configure +++ b/libmudflap/configure @@ -13024,6 +13024,37 @@ echo "${ECHO_T}$gcc_cv_have_tls" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_TLS 1 +_ACEOF + + fi + + echo "$as_me:$LINENO: checking whether the thread-local storage support is from emutls" >&5 +echo $ECHO_N "checking whether the thread-local storage support is from emutls... $ECHO_C" >&6 +if test "${gcc_cv_use_emutls+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gcc_cv_use_emutls=no + echo '__thread int a; int b; int main() { return a = b; }' > conftest.c + if { ac_try='${CC-cc} -Werror -S -o conftest.s conftest.c 1>&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep __emutls_get_address conftest.s > /dev/null; then + gcc_cv_use_emutls=yes + fi + fi + rm -f conftest.* + +fi +echo "$as_me:$LINENO: result: $gcc_cv_use_emutls" >&5 +echo "${ECHO_T}$gcc_cv_use_emutls" >&6 + if test "$gcc_cv_use_emutls" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define USE_EMUTLS 1 _ACEOF fi -- cgit v1.2.1