diff options
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 73764f30183..38cf3c176f8 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4207,6 +4207,37 @@ _start: AC_DEFINE_UNQUOTED(HAVE_AS_IX86_GOT32X, [`if test x"$gcc_cv_as_ix86_got32x" = xyes; then echo 1; else echo 0; fi`], [Define 0/1 if your assembler and linker support @GOT.]) + + conftest_s=' + .section .text,"ax",@progbits + .globl _start + .type _start, @function +_start: + leal ld@tlsldm(%ecx), %eax + call *___tls_get_addr@GOT(%ecx) + leal gd@tlsgd(%ecx), %eax + call *___tls_get_addr@GOT(%ecx) + + .section .tdata,"aw'$tls_section_flag'",@progbits + .type ld, @object +ld: + .byte 0 + .globl gd + .type gd, @object +gd: + .byte 0' + gcc_GAS_CHECK_FEATURE([calling ___tls_get_addr via GOT], + gcc_cv_as_ix86_tls_get_addr_via_got,, + [$as_ix86_gas_32_opt], + [$conftest_s], + [if test x$gcc_cv_ld != x \ + && $gcc_cv_ld $ld_ix86_gld_32_opt -o conftest conftest.o > /dev/null 2>&1; then + gcc_cv_as_ix86_tls_get_addr_via_got=yes + fi + rm -f conftest]) + AC_DEFINE_UNQUOTED(HAVE_AS_IX86_TLS_GET_ADDR_GOT, + [`if test x"$gcc_cv_as_ix86_tls_get_addr_via_got" = xyes; then echo 1; else echo 0; fi`], + [Define 0/1 if your assembler and linker support calling ___tls_get_addr via GOT.]) ;; ia64*-*-*) |