diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 19:10:25 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-29 19:10:25 +0000 |
commit | 1b927e1cb81240f4d6c73eb7cdec45246f6a3c72 (patch) | |
tree | 56e5cd4a6dc56809fa98da6b09135f74ba2ad785 /config | |
parent | 87e27de18fdbc0c21dcbc3108b52cdea8183acad (diff) | |
download | gcc-1b927e1cb81240f4d6c73eb7cdec45246f6a3c72.tar.gz |
2009-01-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r143767
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@143769 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]) |