+2002-10-28 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.gcc (*-*-netbsd*): Add NETBSD_ENABLE_PTHREADS to
+ tm_defines if pthreads are enabled.
+ * config/netbsd.h (LIB_SPEC): Only support the -pthread option
+ if NETBSD_ENABLE_PTHREADS is defined.
+
2002-10-28 Kazu Hirata <kazu@cs.umass.edu>
* ChangeLog.1: Fix typos.
1. Select the appropriate set of libs, depending on whether we're
profiling.
- 2. Include the pthread library if -pthread is specified.
+ 2. Include the pthread library if -pthread is specified (only
+ if threads are enabled).
- 3. Include the posix library if -posix is specified. */
+ 3. Include the posix library if -posix is specified.
+
+ FIXME: Could eliminate the duplication here if we were allowed to
+ use string concatenation. */
#undef LIB_SPEC
+#ifdef NETBSD_ENABLE_PTHREADS
#define LIB_SPEC \
"%{pthread: \
%{!p: \
%{!pg:-lc}} \
%{p:-lc_p} \
%{pg:-lc_p}}}"
+#else
+#define LIB_SPEC \
+ "%{posix: \
+ %{!p: \
+ %{!pg:-lposix}} \
+ %{p:-lposix_p} \
+ %{pg:-lposix_p}} \
+ %{!shared: \
+ %{!symbolic: \
+ %{!p: \
+ %{!pg:-lc}} \
+ %{p:-lc_p} \
+ %{pg:-lc_p}}}"
+#endif
/* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
libgcc with -symbolic. */