aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rwxr-xr-xgcc/configure37
-rw-r--r--gcc/configure.ac37
3 files changed, 51 insertions, 32 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1b81ddc..add19b2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2014-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/60817
+ * configure.ac (set_have_as_tls): Merge i[34567]86-*-* and
+ x86_64-*-* cases.
+ Pass necessary as flags on 64-bit Solaris/x86.
+ Use lowercase relocs for x86_64-*-*.
+ * configure: Regenerate.
+
2014-04-15 Jan Hubicka <jh@suse.cz>
* ipa-devirt.c (referenced_from_vtable_p): New predicate.
diff --git a/gcc/configure b/gcc/configure
index 415377a..11fb90a 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -23283,7 +23283,7 @@ foo: .long 25
tls_first_major=2
tls_first_minor=17
;;
- i[34567]86-*-* | x86_64-*-solaris2.1[0-9]*)
+ i[34567]86-*-* | x86_64-*-*)
case "$target" in
i[34567]86-*-solaris2.*)
on_solaris=yes
@@ -23314,7 +23314,9 @@ $as_echo "#define TLS_SECTION_ASM_FLAG 't'" >>confdefs.h
tls_section_flag=T
tls_as_opt="--fatal-warnings"
fi
- conftest_s="$conftest_s
+ case "$target" in
+ i[34567]86-*-*)
+ conftest_s="$conftest_s
foo: .long 25
.text
movl %gs:0, %eax
@@ -23328,23 +23330,26 @@ foo: .long 25
movl \$foo@tpoff, %eax
subl \$foo@tpoff, %eax
leal foo@ntpoff(%ecx), %eax"
- ;;
- x86_64-*-*)
- conftest_s='
- .section ".tdata","awT",@progbits
+ ;;
+ x86_64-*-*)
+ if test x$on_solaris = xyes; then
+ case $gas_flag in
+ yes) tls_as_opt="$tls_as_opt --64" ;;
+ no) tls_as_opt="$tls_as_opt -xarch=amd64" ;;
+ esac
+ fi
+ conftest_s="$conftest_s
foo: .long 25
.text
movq %fs:0, %rax
- leaq foo@TLSGD(%rip), %rdi
- leaq foo@TLSLD(%rip), %rdi
- leaq foo@DTPOFF(%rax), %rdx
- movq foo@GOTTPOFF(%rip), %rax
- movq $foo@TPOFF, %rax'
- tls_first_major=2
- tls_first_minor=14
- tls_section_flag=T
- tls_as_opt=--fatal-warnings
- ;;
+ leaq foo@tlsgd(%rip), %rdi
+ leaq foo@tlsld(%rip), %rdi
+ leaq foo@dtpoff(%rax), %rdx
+ movq foo@gottpoff(%rip), %rax
+ movq \$foo@tpoff, %rax"
+ ;;
+ esac
+ ;;
ia64-*-*)
conftest_s='
.section ".tdata","awT",@progbits
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 0336066..47e85d5 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2954,7 +2954,7 @@ foo: .long 25
tls_first_major=2
tls_first_minor=17
;;
- i[34567]86-*-* | x86_64-*-solaris2.1[0-9]*)
+ i[34567]86-*-* | x86_64-*-*)
case "$target" in
i[34567]86-*-solaris2.*)
on_solaris=yes
@@ -2986,7 +2986,9 @@ changequote(,)dnl
tls_section_flag=T
tls_as_opt="--fatal-warnings"
fi
- conftest_s="$conftest_s
+ case "$target" in
+ i[34567]86-*-*)
+ conftest_s="$conftest_s
foo: .long 25
.text
movl %gs:0, %eax
@@ -3000,23 +3002,26 @@ foo: .long 25
movl \$foo@tpoff, %eax
subl \$foo@tpoff, %eax
leal foo@ntpoff(%ecx), %eax"
- ;;
- x86_64-*-*)
- conftest_s='
- .section ".tdata","awT",@progbits
+ ;;
+ x86_64-*-*)
+ if test x$on_solaris = xyes; then
+ case $gas_flag in
+ yes) tls_as_opt="$tls_as_opt --64" ;;
+ no) tls_as_opt="$tls_as_opt -xarch=amd64" ;;
+ esac
+ fi
+ conftest_s="$conftest_s
foo: .long 25
.text
movq %fs:0, %rax
- leaq foo@TLSGD(%rip), %rdi
- leaq foo@TLSLD(%rip), %rdi
- leaq foo@DTPOFF(%rax), %rdx
- movq foo@GOTTPOFF(%rip), %rax
- movq $foo@TPOFF, %rax'
- tls_first_major=2
- tls_first_minor=14
- tls_section_flag=T
- tls_as_opt=--fatal-warnings
- ;;
+ leaq foo@tlsgd(%rip), %rdi
+ leaq foo@tlsld(%rip), %rdi
+ leaq foo@dtpoff(%rax), %rdx
+ movq foo@gottpoff(%rip), %rax
+ movq \$foo@tpoff, %rax"
+ ;;
+ esac
+ ;;
ia64-*-*)
conftest_s='
.section ".tdata","awT",@progbits