2 * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
3 * Copyright (c) 1996 by Silicon Graphics. All rights reserved.
4 * Copyright (c) 1998 by Fergus Henderson. All rights reserved.
5 * Copyright (c) 2000-2010 by Hewlett-Packard Development Company.
8 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
9 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
11 * Permission is hereby granted to use or copy this program
12 * for any purpose, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
18 # include "gc_config_macros.h"
19 # include "private/gcconfig.h"
25 # if defined(GC_USE_LD_WRAP)
26 printf("-Wl,--wrap -Wl,dlopen "
27 "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
28 "-Wl,--wrap -Wl,pthread_detach -Wl,--wrap -Wl,pthread_sigmask "
29 "-Wl,--wrap -Wl,pthread_exit -Wl,--wrap -Wl,pthread_cancel\n");
31 # if (defined(GC_LINUX_THREADS) && !defined(PLATFORM_ANDROID)) \
32 || defined(GC_IRIX_THREADS) || defined(GC_DARWIN_THREADS) \
33 || defined(GC_AIX_THREADS) || defined(GC_GNU_THREADS)
34 # ifdef GC_USE_DLOPEN_WRAP
37 printf("-lpthread\n");
39 # if defined(GC_OPENBSD_THREADS)
42 # if defined(GC_FREEBSD_THREADS)
43 # ifdef GC_USE_DLOPEN_WRAP
46 # if (__FREEBSD_version >= 500000)
47 printf("-lpthread\n");
52 # if defined(GC_NETBSD_THREADS)
53 printf("-lpthread -lrt\n");
56 # if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
57 printf("-lpthread -lrt\n");
59 # if defined(GC_SOLARIS_THREADS)
60 printf("-lthread -lposix4\n");
61 /* Is this right for recent versions? */
63 # if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
64 printf("-lpthread\n");
66 # if defined(GC_WIN32_PTHREADS)
67 # ifdef PTW32_STATIC_LIB
68 /* assume suffix s for static version of the win32 pthread library */
69 printf("-lpthreadGC2s -lws2_32\n");
71 printf("-lpthreadGC2\n");
74 # if defined(GC_OSF1_THREADS)
75 printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
77 /* You need GCC 3.0.3 to build this one! */
78 /* DG/UX native gcc doesn't know what "-pthread" is */
79 # if defined(GC_DGUX386_THREADS)
80 printf("-ldl -pthread\n");