From: Jason Thorpe Date: Sun, 15 Sep 2002 18:14:18 +0000 (+0000) Subject: netbsd.h (LIB_SPEC): Include the appropriate pthread library if -pthread is specified. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0c2b2f9345175370ef1d485eb326a58486fd108;p=gcc.git netbsd.h (LIB_SPEC): Include the appropriate pthread library if -pthread is specified. * config/netbsd.h (LIB_SPEC): Include the appropriate pthread library if -pthread is specified. From-SVN: r57164 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 016f5ca0cf4..9055d877827 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-15 Jason Thorpe + + * config/netbsd.h (LIB_SPEC): Include the appropriate pthread + library if -pthread is specified. + 2002-09-15 Jason Thorpe * config.gcc (*-*-netbsd*): Set thread_file to 'posix' diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h index 38eb7491d84..b57d412e53b 100644 --- a/gcc/config/netbsd.h +++ b/gcc/config/netbsd.h @@ -77,14 +77,23 @@ Boston, MA 02111-1307, USA. */ #endif /* NETBSD_NATIVE */ -/* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate - libc, depending on whether we're doing profiling; if `-posix' is specified, - link against the appropriate libposix first. Don't include libc when - linking a shared library. */ +/* Provide a LIB_SPEC appropriate for NetBSD. Here we: + + 1. Select the appropriate set of libs, depending on whether we're + profiling. + + 2. Include the pthread library if -pthread is specified. + + 3. Include the posix library if -posix is specified. */ #undef LIB_SPEC #define LIB_SPEC \ - "%{posix: \ + "%{pthread: \ + %{!p: \ + %{!pg:-lpthread}} \ + %{p:-lpthread_p} \ + %{pg:-lpthread_p}} \ + %{posix: \ %{!p: \ %{!pg:-lposix}} \ %{p:-lposix_p} \