Fix mysterious unremovable file part 2 ?
[cacao.git] / src / mm / boehm-gc / threadlibs.c
1 #include "config.h"
2
3 # include "gc_config_macros.h"
4 # include "private/gcconfig.h"
5 # include <stdio.h>
6
7 int main()
8 {
9 #   if defined(GC_USE_LD_WRAP)
10         printf("-Wl,--wrap -Wl,dlopen "
11                "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
12                "-Wl,--wrap -Wl,pthread_detach "
13                "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
14 #   endif
15 #   if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
16         || defined(GC_SOLARIS_PTHREADS) \
17         || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
18         printf("-lpthread\n");
19 #   endif
20 #   if defined(GC_FREEBSD_THREADS)
21 #       if (__FREEBSD_version >= 500000)
22           printf("-lpthread\n");
23 #       else
24           printf("-pthread\n");
25 #       endif
26 #   endif
27 #   if defined(GC_NETBSD_THREADS)
28           printf("-lpthread -lrt\n");
29 #   endif
30
31 #   if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
32         printf("-lpthread -lrt\n");
33 #   endif
34 #   if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS)
35         printf("-lthread -ldl\n");
36 #   endif
37 #   if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
38         printf("-lpthread\n");
39 #   endif
40 #   if defined(GC_OSF1_THREADS)
41         printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
42 #   endif
43     /* You need GCC 3.0.3 to build this one!           */  
44     /* DG/UX native gcc doesnt know what "-pthread" is */
45 #   if defined(GC_DGUX386_THREADS)
46         printf("-ldl -pthread\n");
47 #   endif
48     return 0;
49 }
50