diff options
author | jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-23 04:58:03 +0000 |
---|---|---|
committer | jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-23 04:58:03 +0000 |
commit | 5a88eb87265ab500347a22f3969195246d5f5358 (patch) | |
tree | 6ddfe08d3b1988039a3b83beaf42660efeaa2cc4 /config | |
parent | a0fa583951228f287a6b2b986a0ddfb434ae0f2f (diff) | |
download | gcc-5a88eb87265ab500347a22f3969195246d5f5358.tar.gz |
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
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 4 | ||||
-rw-r--r-- | config/tls.m4 | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index c57ec35e6a0..feb73b94a0f 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2009-01-23 Jie Zhang <jie.zhang@analog.com> + + * tls.m4 (GCC_CHECK_EMUTLS): Define. + 2008-12-21 Andrew Pinski <pinskia@gmail.com> PR target/38300 diff --git a/config/tls.m4 b/config/tls.m4 index acb123f6986..e77742c7603 100644 --- a/config/tls.m4 +++ b/config/tls.m4 @@ -86,3 +86,21 @@ AC_DEFUN([GCC_CHECK_CC_TLS], [ AC_DEFINE(HAVE_CC_TLS, 1, [Define to 1 if the target assembler supports thread-local storage.]) fi]) + +dnl Check whether TLS is emulated. +AC_DEFUN([GCC_CHECK_EMUTLS], [ + AC_CACHE_CHECK([whether the thread-local storage support is from emutls], + gcc_cv_use_emutls, [ + gcc_cv_use_emutls=no + echo '__thread int a; int b; int main() { return a = b; }' > conftest.c + if AC_TRY_COMMAND(${CC-cc} -Werror -S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD); then + if grep __emutls_get_address conftest.s > /dev/null; then + gcc_cv_use_emutls=yes + fi + fi + rm -f conftest.* + ]) + if test "$gcc_cv_use_emutls" = "yes" ; then + AC_DEFINE(USE_EMUTLS, 1, + [Define to 1 if the target use emutls for thread-local storage.]) + fi]) |