From: Rainer Orth Date: Tue, 4 Apr 2023 08:27:09 +0000 (+0200) Subject: config: -pthread shouldn't link with -lpthread on Solaris X-Git-Tag: basepoints/gcc-14~211 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7735b117bcdd28df662dfa536519bffc75ae9dee;p=thirdparty%2Fgcc.git 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 gcc: * config/sol2.h (LIB_SPEC): Don't link with -lpthread. --- diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 616f9b91212d..cba5ac0fc540 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -161,7 +161,6 @@ along with GCC; see the file COPYING3. If not see #undef LIB_SPEC #define LIB_SPEC \ "%{!symbolic:\ - %{pthreads|pthread:-lpthread} \ %{p|pg:-ldl} -lc}" #ifndef CROSS_DIRECTORY_STRUCTURE