diff options
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/gthr.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgcc/gthr.h b/libgcc/gthr.h index 31c4042..53a5f0f 100644 --- a/libgcc/gthr.h +++ b/libgcc/gthr.h @@ -141,6 +141,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define GTHREAD_USE_WEAK 0 #endif +#ifdef __GLIBC_PREREQ +#if __GLIBC_PREREQ(2, 34) +/* glibc 2.34 and later has all pthread_* APIs inside of libc, + no need to link separately with -lpthread. */ +#undef GTHREAD_USE_WEAK +#define GTHREAD_USE_WEAK 0 +#endif +#endif + #ifndef GTHREAD_USE_WEAK #define GTHREAD_USE_WEAK 1 #endif |