aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgomp/configure
diff options
context:
space:
mode:
authorAlexander Ivchenko <alexander.ivchenko@intel.com>2014-12-18 16:46:17 +0300
committerAlexander Ivchenko <alexander.ivchenko@intel.com>2014-12-18 16:49:24 +0300
commit866bd0b46cd84957df84e7a3e674d9777807b7f7 (patch)
treedc68ae6f6dc6c1af108a9b790c31d84c02db0ed8 /gcc-4.9/libgomp/configure
parent10a15a8a1fc940f47b008004b9180c0852c3e143 (diff)
downloadtoolchain_gcc-866bd0b46cd84957df84e7a3e674d9777807b7f7.zip
toolchain_gcc-866bd0b46cd84957df84e7a3e674d9777807b7f7.tar.gz
toolchain_gcc-866bd0b46cd84957df84e7a3e674d9777807b7f7.tar.bz2
[4.8, 4.9] Fix crash of omp loops that are not in the main thread.
Issue happens only when gcc is configured with "--disable-tls". Backport from trunk for fixing PR42616 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. Change-Id: Iee574d1a7888b3bcbd01718669eac34fdd116abb Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Diffstat (limited to 'gcc-4.9/libgomp/configure')
-rwxr-xr-xgcc-4.9/libgomp/configure31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.9/libgomp/configure b/gcc-4.9/libgomp/configure
index 39bb5cd..784e69f 100755
--- a/gcc-4.9/libgomp/configure
+++ b/gcc-4.9/libgomp/configure
@@ -15535,6 +15535,37 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h
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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5