OSDN Git Service

PR target/46131
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Nov 2010 16:07:04 +0000 (16:07 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Nov 2010 16:07:04 +0000 (16:07 +0000)
* lib/target-supports.exp (add_options_for_tls): Pass -pthread for
*-*-osf*.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166198 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index d1af154..44a575c 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR target/46131
+       * lib/target-supports.exp (add_options_for_tls): Pass -pthread for
+       *-*-osf*.
+
 2010-11-02  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/46184
index 87b234d..f387d7e 100644 (file)
@@ -613,6 +613,11 @@ proc check_effective_target_pcc_bitfield_type_matters { } {
 # Add to FLAGS all the target-specific flags needed to use thread-local storage.
 
 proc add_options_for_tls { flags } {
+    # Tru64 UNIX uses emutls, which relies on a couple of pthread functions
+    # which only live in libpthread, so always pass -pthread for TLS.
+    if { [istarget *-*-osf*] } {
+       return "$flags -pthread"
+    }
     # On Solaris 8 and 9, __tls_get_addr/___tls_get_addr only lives in
     # libthread, so always pass -pthread for native TLS.
     # Need to duplicate native TLS check from