[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: support for multithread-safe libraries
From: |
Oskar Liljeblad |
Subject: |
Re: support for multithread-safe libraries |
Date: |
Fri, 15 Jul 2005 22:50:50 +0200 |
User-agent: |
Mutt/1.5.9i |
On Thursday, July 14, 2005 at 16:14, Bruno Haible wrote:
> dnl Survey of platforms:
> dnl
> dnl Platform Available Compiler Supports test-lock
> dnl flavours option weak result
> dnl --------------- --------- --------- -------- ---------
> dnl Linux 2.4/glibc posix -lpthread Y OK
[..]
http://autoconf-archive.cryp.to/acx_pthread.html uses a set of
tests for pthread support. Some notes from it:
-lpthreads
AIX (must check this before -lpthread)
(no flags)
in case threads are in libc; should be tried before -Kthread and
other compiler flags to prevent continual compiler warnings
-Kthread
Sequent (threads in libc, but -Kthread needed for pthread.h)
-kthread
FreeBSD kernel threads (preferred to -pthread since SMP-able)
-llthread
LinuxThreads port on FreeBSD (also preferred to -pthread)
-pthread
Linux/gcc (kernel threads), BSD/gcc (userland threads), etc.
-pthreads
Solaris/gcc
-mthreads
Mingw32/gcc, Lynx/gcc
-mt
Sun Workshop C (may only link SunOS threads [-lthread], but it
doesn't hurt to check since this sometimes defines pthreads too;
also defines -D_REENTRANT)
--thread-safe
KAI C++
GNU pth uses pth-config (or previously pthread-config) to determine
compiler and linker flags.
Does gcc prefer -pthread or -lpthread?
Regards,
Oskar Liljeblad (address@hidden)
Re: support for multithread-safe libraries,
Oskar Liljeblad <=
Re: support for multithread-safe libraries, Albert Chin, 2005/07/19
Re: support for multithread-safe libraries, Albert Chin, 2005/07/19