threadlibs.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # include "private/gcconfig.h"
  2. # include <stdio.h>
  3. int main()
  4. {
  5. # if defined(GC_USE_LD_WRAP)
  6. printf("-Wl,--wrap -Wl,dlopen "
  7. "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join "
  8. "-Wl,--wrap -Wl,pthread_detach "
  9. "-Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,sleep\n");
  10. # endif
  11. # if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
  12. || defined(GC_FREEBSD_THREADS) || defined(GC_SOLARIS_PTHREADS) \
  13. || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
  14. printf("-lpthread\n");
  15. # endif
  16. # if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS)
  17. printf("-lpthread -lrt\n");
  18. # endif
  19. # if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS)
  20. printf("-lthread -ldl\n");
  21. # endif
  22. # if defined(GC_WIN32_THREADS) && defined(CYGWIN32)
  23. printf("-lpthread\n");
  24. # endif
  25. # if defined(GC_OSF1_THREADS)
  26. printf("-pthread -lrt"); /* DOB: must be -pthread, not -lpthread */
  27. # endif
  28. /* You need GCC 3.0.3 to build this one! */
  29. /* DG/UX native gcc doesnt know what "-pthread" is */
  30. # if defined(GC_DGUX386_THREADS)
  31. printf("-ldl -pthread\n");
  32. # endif
  33. return 0;
  34. }