This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[build] Link libgcjgc with -lrt on Solaris > 8

Testing my boehm-gc testsuite patch

	[testsuite, build] Convert boehm-gc testsuite to DejaGnu (PR boehm-gc/11412)

on Solaris < 11 revealed that my last cleanup

	PATCH: Only use /usr/lib/lwp in boehm-gc on Solaris 8

has been over-eager in removing -lrt beyond Solaris 8: all tests failed
because references sched_yield and sem_* functions, which
only live in librt before Solaris 11.

This patch fixes this and lets the boehm-gc DejaGnu testsuite pass on
Solaris 8 to 11, SPARC and x86.



2011-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* (*-*-solaris2*): Add -lrt to THREADLIBS.
	* configure: Regenerate.

diff -r e5d3f67cc78f boehm-gc/
--- a/boehm-gc/	Sat Jan 08 01:34:09 2011 +0100
+++ b/boehm-gc/	Sat Jan 08 02:17:03 2011 +0100
@@ -193,7 +193,9 @@
 	# The alternate thread library was only introduced in Solaris 8 and
 	# became the default in Solaris 9, so no need for the special code
 	# above otherwise.
-	THREADLIBS=-lpthread
+	# nanosleep, sched_yield, and sem_* only live in librt before
+	# Solaris 11.
+	THREADLIBS="-lpthread -lrt"
 	AC_DEFINE(GC_IRIX_THREADS,1,[support for Irix pthreads])

Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]