OSDN Git Service

2010-08-15 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / boehm-gc / threadlibs.c
index 247d3c6..9078c8d 100644 (file)
@@ -1,3 +1,4 @@
+# include "gc_config_macros.h"
 # include "private/gcconfig.h"
 # include <stdio.h>
 
@@ -10,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