Commit f50eecba by Varvara Rainchik Committed by Kirill Yukhin

config.h.in: Regenerate.


libgomp/
        * config.h.in: Regenerate.
        * configure: Regenerate.
        * configure.ac: Add GCC_CHECK_EMUTLS.
        * libgomp.h: Add check for USE_EMUTLS: this case
        is equal to HAVE_TLS.
        * team.c: Likewise.

From-SVN: r218576
parent d0d7c357
2014-12-09 Varvara Rainchik <varvara.rainchik@intel.com>
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add GCC_CHECK_EMUTLS.
* libgomp.h: Add check for USE_EMUTLS: this case
is equal to HAVE_TLS.
* team.c: Likewise.
2014-12-03 Uros Bizjak <ubizjak@gmail.com> 2014-12-03 Uros Bizjak <ubizjak@gmail.com>
* configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic. * configure.tgt (x86_64-*-linux*): Tune -m32 multilib to generic.
......
...@@ -79,6 +79,9 @@ ...@@ -79,6 +79,9 @@
/* Define to 1 if the target supports thread-local storage. */ /* Define to 1 if the target supports thread-local storage. */
#undef HAVE_TLS #undef HAVE_TLS
/* Define to 1 if the target use emutls for thread-local storage. */
#undef USE_EMUTLS
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
......
...@@ -15515,6 +15515,37 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h ...@@ -15515,6 +15515,37 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h
fi fi
# See if we have emulated thread-local storage.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the thread-local storage support is from emutls" >&5
$as_echo_n "checking whether the thread-local storage support is from emutls... " >&6; }
if test "${gcc_cv_use_emutls+set}" = set; then :
$as_echo_n "(cached) " >&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\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
if grep __emutls_get_address conftest.s > /dev/null; then
gcc_cv_use_emutls=yes
fi
fi
rm -f conftest.*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_use_emutls" >&5
$as_echo "$gcc_cv_use_emutls" >&6; }
if test "$gcc_cv_use_emutls" = "yes" ; then
$as_echo "#define USE_EMUTLS 1" >>confdefs.h
fi
# See what sort of export controls are available. # See what sort of export controls are available.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5
......
...@@ -245,6 +245,9 @@ fi ...@@ -245,6 +245,9 @@ fi
# See if we support thread-local storage. # See if we support thread-local storage.
GCC_CHECK_TLS GCC_CHECK_TLS
# See if we have emulated thread-local storage.
GCC_CHECK_EMUTLS
# See what sort of export controls are available. # See what sort of export controls are available.
LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY LIBGOMP_CHECK_ATTRIBUTE_VISIBILITY
LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT LIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT
......
...@@ -471,7 +471,7 @@ enum gomp_cancel_kind ...@@ -471,7 +471,7 @@ enum gomp_cancel_kind
/* ... and here is that TLS data. */ /* ... and here is that TLS data. */
#ifdef HAVE_TLS #if defined HAVE_TLS || defined USE_EMUTLS
extern __thread struct gomp_thread gomp_tls_data; extern __thread struct gomp_thread gomp_tls_data;
static inline struct gomp_thread *gomp_thread (void) static inline struct gomp_thread *gomp_thread (void)
{ {
......
...@@ -37,7 +37,7 @@ pthread_key_t gomp_thread_destructor; ...@@ -37,7 +37,7 @@ pthread_key_t gomp_thread_destructor;
/* This is the libgomp per-thread data structure. */ /* This is the libgomp per-thread data structure. */
#ifdef HAVE_TLS #if defined HAVE_TLS || defined USE_EMUTLS
__thread struct gomp_thread gomp_tls_data; __thread struct gomp_thread gomp_tls_data;
#else #else
pthread_key_t gomp_tls_key; pthread_key_t gomp_tls_key;
...@@ -70,7 +70,7 @@ gomp_thread_start (void *xdata) ...@@ -70,7 +70,7 @@ gomp_thread_start (void *xdata)
void (*local_fn) (void *); void (*local_fn) (void *);
void *local_data; void *local_data;
#ifdef HAVE_TLS #if defined HAVE_TLS || defined USE_EMUTLS
thr = &gomp_tls_data; thr = &gomp_tls_data;
#else #else
struct gomp_thread local_thr; struct gomp_thread local_thr;
...@@ -916,7 +916,7 @@ gomp_team_end (void) ...@@ -916,7 +916,7 @@ gomp_team_end (void)
static void __attribute__((constructor)) static void __attribute__((constructor))
initialize_team (void) initialize_team (void)
{ {
#ifndef HAVE_TLS #if !defined HAVE_TLS && !defined USE_EMUTLS
static struct gomp_thread initial_thread_tls_data; static struct gomp_thread initial_thread_tls_data;
pthread_key_create (&gomp_tls_key, NULL); pthread_key_create (&gomp_tls_key, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment