X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=boehm-gc%2Fthreadlibs.c;h=247d3c652ec3a71c834879a1c2989de5778308cf;hb=30c3de1ffb2daa8b2b8281bcece806793c4d4803;hp=c8530e6fe331bfad3d37eb06b1eda31649077fe8;hpb=73ffefd017128fecccdd52aa8b6fb9f042e0bbb8;p=platform%2Fupstream%2Fgcc.git diff --git a/boehm-gc/threadlibs.c b/boehm-gc/threadlibs.c index c8530e6..247d3c6 100644 --- a/boehm-gc/threadlibs.c +++ b/boehm-gc/threadlibs.c @@ -1,14 +1,36 @@ -# include "config.h" +# include "private/gcconfig.h" # include int main() { -# if defined(IRIX_THREADS) || defined(LINUX_THREADS) - printf("-lpthread\n"); +# if defined(GC_USE_LD_WRAP) + printf("-Wl,--wrap -Wl,dlopen " + "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join " + "-Wl,--wrap -Wl,pthread_detach " + "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n"); # endif -# ifdef SOLARIS_THREADS +# if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \ + || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \ + || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) + printf("-lpthread\n"); +# endif +# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) + printf("-lpthread -lrt\n"); +# endif +# if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS) printf("-lthread -ldl\n"); # endif +# if defined(GC_WIN32_THREADS) && defined(CYGWIN32) + printf("-lpthread\n"); +# endif +# if defined(GC_OSF1_THREADS) + printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */ +# endif + /* You need GCC 3.0.3 to build this one! */ + /* DG/UX native gcc doesnt know what "-pthread" is */ +# if defined(GC_DGUX386_THREADS) + printf("-ldl -pthread\n"); +# endif return 0; }