]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use alternate thread library on Solaris 8 even without TLS
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 22 Feb 2012 11:27:45 +0000 (11:27 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Wed, 22 Feb 2012 11:27:45 +0000 (11:27 +0000)
* configure.ac (LIB_TLS_SPEC): Enforce use of alternate thread
library on Solaris 8 even without TLS support.
* configure: Regenerate.

From-SVN: r184467

gcc/ChangeLog
gcc/configure
gcc/configure.ac

index cc6d64c4f10ca3041c9b653de71296854121ee7f..4fe5259d04d1159e585791a14913598074d11d5b 100644 (file)
@@ -1,9 +1,15 @@
+2012-02-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * configure.ac (LIB_TLS_SPEC): Enforce use of alternate thread
+       library on Solaris 8 even without TLS support.
+       * configure: Regenerate.
+
 2012-02-22  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/52329
        * gimple-fold.c (fold_stmt_1): Also canonicalize ADDR_EXPRs
        for GIMPLE_DEBUG stmts.
+
 2012-02-22  Martin Jambor  <mjambor@suse.cz>
 
        PR middle-end/51782
index 2a84fc37073fda4e29d3b08bc0f17a4f70e50426..4bca79075c4d35b6b612736254944673057de17f 100755 (executable)
     if test $set_have_as_tls = no; then
       LIBS=
     fi
+    # Even without TLS support on Solaris 8, explicitly link with libthread
+    # to guarantee that the alternate thread library is used.
+    case "$target" in
+      *-*-solaris2.8)
+       LIBS=-lthread
+       ;;
+    esac
     # Always define LIB_TLS_SPEC, even without TLS support.
 
 cat >>confdefs.h <<_ACEOF
index 97be57b83e3fd9d3668a8a3b6dbe75f9971bd8a7..57210f45202d05d2692c3bb3335d18e9b470ac22 100644 (file)
@@ -3264,6 +3264,13 @@ case "$target" in
     if test $set_have_as_tls = no; then
       LIBS=
     fi
+    # Even without TLS support on Solaris 8, explicitly link with libthread
+    # to guarantee that the alternate thread library is used.
+    case "$target" in
+      *-*-solaris2.8)
+       LIBS=-lthread
+       ;;
+    esac
     # Always define LIB_TLS_SPEC, even without TLS support.
     AC_DEFINE_UNQUOTED(LIB_TLS_SPEC, "$LIBS",
         [Define to the library containing __tls_get_addr/___tls_get_addr.])