From eedcd8ac62021450233acebe0d2d42faaf6a99c4 Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 23 Jul 2010 17:58:57 +0000 Subject: libjava: * configure.ac (*-*-solaris2.8): Use alternate thread library. Add libthread. (*-*-solaris2.9): Use libthread. * configure: Regenerate. libgomp: * configure.tgt (*-*-solaris2.[56]*): Removed. gcc: * configure.ac: Don't disable TLS on Solaris 8/9 by default Set tga_func for Solaris 2/x86 resp. SPARC. Remove duplicate parts of sparc*-sun-solaris2.* TLS check. (LIB_THREAD_LDFLAGS_SPEC): Define. (LIB_TLS_SPEC): Define. Check for required Sun ld version. * configure: Regenerate. * config.in: Regenerate. * config/sol2.h (LIB_SPEC): Use LIB_THREAD_LDFLAGS_SPEC with -pthread, -threads, LIB_TLS_SPEC with -pthread. * doc/install.texi (Specific, *-*-solaris2*): Document use of alternate thread libraries on Solaris 8. Document TLS patch requirements. * doc/sourcebuild.texi (Add Options): Sort alphabetically. Document tls. PR target/18788 * config/sol2.h (LIB_SPEC): Link with thread libraries even with -shared. gcc/testsuite: * lib/target-supports.exp (add_options_for_tls): New proc. * g++.dg/tls/static-1.C: Use dg-add-options tls. * g++.dg/tls/static-1a.cc: Likewise. * gcc.dg/tls/emutls-1.c: Likewise. * gcc.dg/tls/opt-11.c: Likewise. * gcc.dg/tls/opt-12.c: Likewise. * gcc.dg/tls/pr24428-2.c: Likewise. * gcc.dg/tls/pr24428.c: Likewise. * obj-c++.dg/tls/static-1.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-1.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-2.mm: Likewise. * obj-c++.dg/torture/tls/thr-init-3.mm: Likewise. * objc.dg/torture/tls/thr-init-2.m: Likewise. * objc.dg/torture/tls/thr-init-3.m: Likewise. * objc.dg/torture/tls/thr-init.m: Likewise. * gcc.dg/lto/20090210_0.c: Add -pthread for *-*-solaris2.[89]. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162478 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 7 +++++++ libjava/configure | 13 +++++++++++++ libjava/configure.ac | 13 +++++++++++++ 3 files changed, 33 insertions(+) (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index de24a9ece25..7d01621d390 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2010-07-23 Rainer Orth + + * configure.ac (*-*-solaris2.8): Use alternate thread library. + Add libthread. + (*-*-solaris2.9): Use libthread. + * configure: Regenerate. + 2010-07-15 Rainer Orth * include/sparc-signal.h: Renamed to ... diff --git a/libjava/configure b/libjava/configure index 89d5b6c4a8d..8ccfa24cc12 100755 --- a/libjava/configure +++ b/libjava/configure @@ -20712,6 +20712,19 @@ case "$THREADS" in THREADLIBS='-lpthread -lrt' THREADSPEC='-lpthread -lrt' ;; + *-*-solaris2.8) + # Always use alternate thread library on Solaris 8. Need libthread + # for TLS support. + # Need -Wl,-R to get it through libtool ... + THREADLIBS='-L/usr/lib/lwp$(MULTISUBDIR) -Wl,-R -Wl,/usr/lib/lwp$(MULTISUBDIR) -lpthread -lthread' + # ... while ld only accepts -R. + THREADSPEC='-L/usr/lib/lwp%{m64:/64} -R/usr/lib/lwp%{m64:/64} -lpthread -lthread' + ;; + *-*-solaris2.9) + # As on Solaris 8, need libthread for TLS support. + THREADLIBS='-lpthread -lthread' + THREADSPEC='-lpthread -lthread' + ;; *) THREADLIBS=-lpthread THREADSPEC=-lpthread diff --git a/libjava/configure.ac b/libjava/configure.ac index 477766ae1ca..125e9ce9b46 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1064,6 +1064,19 @@ case "$THREADS" in THREADLIBS='-lpthread -lrt' THREADSPEC='-lpthread -lrt' ;; + *-*-solaris2.8) + # Always use alternate thread library on Solaris 8. Need libthread + # for TLS support. + # Need -Wl,-R to get it through libtool ... + THREADLIBS='-L/usr/lib/lwp$(MULTISUBDIR) -Wl,-R -Wl,/usr/lib/lwp$(MULTISUBDIR) -lpthread -lthread' + # ... while ld only accepts -R. + THREADSPEC='-L/usr/lib/lwp%{m64:/64} -R/usr/lib/lwp%{m64:/64} -lpthread -lthread' + ;; + *-*-solaris2.9) + # As on Solaris 8, need libthread for TLS support. + THREADLIBS='-lpthread -lthread' + THREADSPEC='-lpthread -lthread' + ;; *) THREADLIBS=-lpthread THREADSPEC=-lpthread -- cgit v1.2.1