summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-28 17:20:36 +0000
committerthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-28 17:20:36 +0000
commit6686021909751a30fc887ce06640855afbe1a656 (patch)
treef36c06fc63e7b0228451b0448472fe8ba69bb015
parent10acaf193e3d65fe90694e0488759f4586c6cfb1 (diff)
downloadppe42-gcc-6686021909751a30fc887ce06640855afbe1a656.tar.gz
ppe42-gcc-6686021909751a30fc887ce06640855afbe1a656.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58599 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config.gcc1
-rw-r--r--gcc/config/netbsd.h23
3 files changed, 29 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 52fe07fd52f..51d7e31aa5e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index bf946599475..973a848ffd0 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -367,6 +367,7 @@ case $machine in
case x${enable_threads} in
xyes | xposix)
thread_file='posix'
+ tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
;;
esac
;;
diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h
index c83ff0f545e..f1f3589f48b 100644
--- a/gcc/config/netbsd.h
+++ b/gcc/config/netbsd.h
@@ -82,11 +82,16 @@ Boston, MA 02111-1307, USA. */
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: \
@@ -104,6 +109,20 @@ Boston, MA 02111-1307, USA. */
%{!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. */
OpenPOWER on IntegriCloud