diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-30 13:08:52 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-30 13:08:52 +0000 |
commit | 8f0f72c0571a7ec64e9ad20bb6211fd44b5af7ee (patch) | |
tree | 289b5c46ab914bf871f7cb4ed1773b3ade816a05 /libgcc | |
parent | b6d771b1c7d1f99cc2a6a95b0305adb9cddf87a8 (diff) | |
download | gcc-8f0f72c0571a7ec64e9ad20bb6211fd44b5af7ee.tar.gz |
2010-03-30 Jack Howarth <howarth@bromo.med.uc.edu>
PR c/43553
* Makefile.in (INTERNAL_CFLAGS): Add @set_use_emutls@.
* configure.ac: Use GCC_CHECK_EMUTLS to see if emulated TLS
is used and substitute set_use_emutls.
* configure: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 8 | ||||
-rw-r--r-- | libgcc/Makefile.in | 2 | ||||
-rw-r--r-- | libgcc/configure | 37 | ||||
-rw-r--r-- | libgcc/configure.ac | 8 |
4 files changed, 54 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index c8726ab312f..677753efc07 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,11 @@ +2010-03-30 Jack Howarth <howarth@bromo.med.uc.edu> + + PR c/43553 + * Makefile.in (INTERNAL_CFLAGS): Add @set_use_emutls@. + * configure.ac: Use GCC_CHECK_EMUTLS to see if emulated TLS + is used and substitute set_use_emutls. + * configure: Regenerated. + 2010-03-30 Tarik Graba <tarik.graba@telecom-paristech.fr> * config/lm32/t-lm32: Remove misplaced MULTILIB_OPTIONS. diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 938d07083b4..080aae28707 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -226,7 +226,7 @@ override CFLAGS := $(filter-out -fprofile-generate -fprofile-use,$(CFLAGS)) # will usually contain -g, so for the moment CFLAGS goes first. We must # include CFLAGS - that's where multilib options live. INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ - $(INCLUDES) @set_have_cc_tls@ + $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@ MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory) MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory) diff --git a/libgcc/configure b/libgcc/configure index b6c003cf94b..f5224276693 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -556,6 +556,7 @@ LIBOBJS asm_hidden_op extra_parts tmake_file +set_use_emutls set_have_cc_tls vis_hide fixed_point @@ -3811,6 +3812,42 @@ if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then 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 +set_use_emutls= +if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then + set_use_emutls="-DUSE_EMUTLS" +fi + + # Conditionalize the makefile for this target machine. tmake_file_= for f in ${tmake_file} diff --git a/libgcc/configure.ac b/libgcc/configure.ac index e735019dfc7..ce467dda598 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -238,6 +238,14 @@ if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then fi AC_SUBST(set_have_cc_tls) +# See if we have emulated thread-local storage. +GCC_CHECK_EMUTLS +set_use_emutls= +if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then + set_use_emutls="-DUSE_EMUTLS" +fi +AC_SUBST(set_use_emutls) + # Conditionalize the makefile for this target machine. tmake_file_= for f in ${tmake_file} |