netbsd.h (LIB_SPEC): Include the appropriate pthread library if -pthread is specified.
authorJason Thorpe <thorpej@wasabisystems.com>
Sun, 15 Sep 2002 18:14:18 +0000 (18:14 +0000)
committerJason Thorpe <thorpej@gcc.gnu.org>
Sun, 15 Sep 2002 18:14:18 +0000 (18:14 +0000)
* config/netbsd.h (LIB_SPEC): Include the appropriate pthread
library if -pthread is specified.

From-SVN: r57164

gcc/ChangeLog
gcc/config/netbsd.h

index 016f5ca0cf4ebad6e8cbc5a26f9c00b3677c68ee..9055d877827a2a805b3c713ffe5ae1dfc820756f 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-15  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * config/netbsd.h (LIB_SPEC): Include the appropriate pthread
+       library if -pthread is specified.
+
 2002-09-15  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * config.gcc (*-*-netbsd*): Set thread_file to 'posix'
index 38eb7491d8441abe3a1807ddb01b21d92ab47e1c..b57d412e53b6ef385f2534160eed8379367d2184 100644 (file)
@@ -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}            \