libjava adjustments for FreeBSD 5 and above

Gerald Pfeifer
Tue Apr 11 20:10:00 GMT 2006

I installed the following patch on the GCC 4.1 branch, after it has
been acked by Loren J. Rittle and Tom Tromey, and I did basic testing
on a FreeBSD 5.4 machine.

I could not yet test GCC HEAD due to the lack of jar right now, but
plan for a workaround and will install the patch there as well then.


2006-04-11  NAKATA Maho  <> 

	PR libgcj/23829
	* Link against -lpthread rather than -lc_r on
	FreeBSD 5 and above.
	* configure: Regenerate.

---	(revision 112851)
+++	(working copy)
@@ -803,11 +803,10 @@
 	THREADSPEC='%{!pthread: %{!shared: %eUnder this configuration, the user must provide -pthread when linking.}}'
-	# FreeBSD 5 implements a model much closer to other modern UNIX
-	# which support threads.  However, it still does not support
-	# -lpthread.
+	# FreeBSD >=5.3 implements a model much closer to other modern UNIX
+	# systems which support threads and -lpthread.
+	THREADSPEC=-lpthread

More information about the Gcc-patches mailing list