| 1 |
/* |
| 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. |
| 6 |
* All rights reserved. |
| 7 |
* |
| 8 |
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED |
| 9 |
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK. |
| 10 |
* |
| 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. |
| 16 |
*/ |
| 17 |
|
| 18 |
# include "private/gc_priv.h" |
| 19 |
|
| 20 |
# include <stdio.h> |
| 21 |
|
| 22 |
int main(void) |
| 23 |
{ |
| 24 |
# if defined(GC_USE_LD_WRAP) |
| 25 |
printf("-Wl,--wrap -Wl,dlopen " |
| 26 |
"-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join " |
| 27 |
"-Wl,--wrap -Wl,pthread_detach -Wl,--wrap -Wl,pthread_sigmask " |
| 28 |
"-Wl,--wrap -Wl,pthread_exit -Wl,--wrap -Wl,pthread_cancel\n"); |
| 29 |
# endif |
| 30 |
# if (defined(GC_LINUX_THREADS) && !defined(HOST_ANDROID)) \ |
| 31 |
|| defined(GC_IRIX_THREADS) || defined(GC_DARWIN_THREADS) \ |
| 32 |
|| defined(GC_AIX_THREADS) || (defined(HURD) && defined(GC_THREADS)) |
| 33 |
# ifdef GC_USE_DLOPEN_WRAP |
| 34 |
printf("-ldl "); |
| 35 |
# endif |
| 36 |
printf("-lpthread\n"); |
| 37 |
# endif |
| 38 |
# if defined(GC_OPENBSD_THREADS) |
| 39 |
printf("-pthread\n"); |
| 40 |
# endif |
| 41 |
# if defined(GC_FREEBSD_THREADS) |
| 42 |
# ifdef GC_USE_DLOPEN_WRAP |
| 43 |
printf("-ldl "); |
| 44 |
# endif |
| 45 |
# if (__FREEBSD_version < 500000) |
| 46 |
printf("-pthread\n"); |
| 47 |
# else /* __FREEBSD__ || __DragonFly__ */ |
| 48 |
printf("-lpthread\n"); |
| 49 |
# endif |
| 50 |
# endif |
| 51 |
# if defined(GC_NETBSD_THREADS) |
| 52 |
printf("-lpthread -lrt\n"); |
| 53 |
# endif |
| 54 |
|
| 55 |
# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) |
| 56 |
printf("-lpthread -lrt\n"); |
| 57 |
# endif |
| 58 |
# if defined(GC_SOLARIS_THREADS) |
| 59 |
printf("-lthread -lposix4\n"); |
| 60 |
/* Is this right for recent versions? */ |
| 61 |
# endif |
| 62 |
# if defined(GC_WIN32_THREADS) && defined(CYGWIN32) |
| 63 |
printf("-lpthread\n"); |
| 64 |
# endif |
| 65 |
# if defined(GC_WIN32_PTHREADS) |
| 66 |
# ifdef PTW32_STATIC_LIB |
| 67 |
/* assume suffix s for static version of the pthreads-win32 library */ |
| 68 |
printf("-lpthreadGC2s -lws2_32\n"); |
| 69 |
# else |
| 70 |
printf("-lpthreadGC2\n"); |
| 71 |
# endif |
| 72 |
# endif |
| 73 |
# if defined(GC_OSF1_THREADS) |
| 74 |
printf("-pthread -lrt\n"); /* DOB: must be -pthread, not -lpthread */ |
| 75 |
# endif |
| 76 |
/* You need GCC 3.0.3 to build this one! */ |
| 77 |
/* DG/UX native gcc doesn't know what "-pthread" is */ |
| 78 |
# if defined(GC_DGUX386_THREADS) |
| 79 |
printf("-ldl -pthread\n"); |
| 80 |
# endif |
| 81 |
return 0; |
| 82 |
} |