summaryrefslogtreecommitdiff
path: root/boehm-gc/threadlibs.c
diff options
context:
space:
mode:
Diffstat (limited to 'boehm-gc/threadlibs.c')
-rw-r--r--boehm-gc/threadlibs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/boehm-gc/threadlibs.c b/boehm-gc/threadlibs.c
index 264b7240cbe..9078c8d8cd9 100644
--- a/boehm-gc/threadlibs.c
+++ b/boehm-gc/threadlibs.c
@@ -11,10 +11,17 @@ int main()
"-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
# endif
# if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
- || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \
+ || defined(GC_SOLARIS_PTHREADS) \
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
printf("-lpthread\n");
# endif
+# if defined(GC_FREEBSD_THREADS)
+# if (__FREEBSD_version >= 500000)
+ printf("-lpthread\n");
+# else
+ printf("-pthread\n");
+# endif
+# endif
# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
printf("-lpthread -lrt\n");
# endif