aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/netbsd.h
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@wasabisystems.com>2002-09-15 18:14:18 +0000
committerJason Thorpe <thorpej@gcc.gnu.org>2002-09-15 18:14:18 +0000
commitb0c2b2f9345175370ef1d485eb326a58486fd108 (patch)
tree41fb57985cf24878b6cf2a1308e14942670a7e2b /gcc/config/netbsd.h
parenta0494c057ab0c2771725bbf8281c652060a5fff5 (diff)
downloadgcc-b0c2b2f9345175370ef1d485eb326a58486fd108.zip
gcc-b0c2b2f9345175370ef1d485eb326a58486fd108.tar.gz
gcc-b0c2b2f9345175370ef1d485eb326a58486fd108.tar.bz2
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
Diffstat (limited to 'gcc/config/netbsd.h')
-rw-r--r--gcc/config/netbsd.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h
index 38eb749..b57d412 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} \