Pthreads: Difference between revisions
No edit summary |
|||
| Line 168: | Line 168: | ||
* the [[LinuxThreads]] port (devel/linuxthreads; this does NOT require emulators/linux-base*) | * the [[LinuxThreads]] port (devel/linuxthreads; this does NOT require emulators/linux-base*) | ||
all threaded code muse use the reentrant version of the gcc builtin libs; this is done via -lgcc_r (-pthread should set this up). In addition, use -llthread to link against [[LinuxThreads]]. | all threaded code muse use the reentrant version of the gcc builtin libs; this is done via -lgcc_r (-pthread should set this up). In addition, use -llthread to link against [[LinuxThreads]]. | ||
==Use with [[autotools]]== | |||
The <tt>AX_PTHREAD</tt> [http://www.gnu.org/software/autoconf-archive/ax_pthread.html macro] from the Autoconf Archive is canonical, defining <tt>PTHREAD_LIBS</tt>, <tt>PTHREAD_CFLAGS</tt>, and <tt>PTHREAD_CC</tt>. | |||