Skip to content
Snippets Groups Projects
Commit 7735b117 authored by Rainer Orth's avatar Rainer Orth
Browse files

config: -pthread shouldn't link with -lpthread on Solaris

libpthread has been folded into libc since Solaris 10 and replaced by a
filter on libc.  Linking with libpthread thus only creates unnecessary
runtime overhead.

This patch thus removes linking with -lpthread if -pthread/-pthreads is
specified, thus getting rid of the libpthread dependency in libatomic,
libgdruntime, libgomp, libgphobos, and libitm.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11 (both Solaris 11.3 and 11.4).

2023-04-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* config/sol2.h (LIB_SPEC): Don't link with -lpthread.
parent d0b961b8
No related branches found
No related tags found
No related merge requests found
...@@ -161,7 +161,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -161,7 +161,6 @@ along with GCC; see the file COPYING3. If not see
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC \ #define LIB_SPEC \
"%{!symbolic:\ "%{!symbolic:\
%{pthreads|pthread:-lpthread} \
%{p|pg:-ldl} -lc}" %{p|pg:-ldl} -lc}"
#ifndef CROSS_DIRECTORY_STRUCTURE #ifndef CROSS_DIRECTORY_STRUCTURE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment