diff options
author | Jason Thorpe <thorpej@wasabisystems.com> | 2002-10-28 17:20:36 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@gcc.gnu.org> | 2002-10-28 17:20:36 +0000 |
commit | ee3c755a456f622ae2688dd8820a53ce3c6912a5 (patch) | |
tree | f36c06fc63e7b0228451b0448472fe8ba69bb015 /gcc/config/netbsd.h | |
parent | c6362f4ff9a00e9bc69db6d8b7ae26498471a19f (diff) | |
download | gcc-ee3c755a456f622ae2688dd8820a53ce3c6912a5.zip gcc-ee3c755a456f622ae2688dd8820a53ce3c6912a5.tar.gz gcc-ee3c755a456f622ae2688dd8820a53ce3c6912a5.tar.bz2 |
config.gcc (*-*-netbsd*): Add NETBSD_ENABLE_PTHREADS to tm_defines if pthreads are enabled.
* 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.
From-SVN: r58599
Diffstat (limited to 'gcc/config/netbsd.h')
-rw-r--r-- | gcc/config/netbsd.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h index c83ff0f..f1f3589 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. */ |