[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
The code generated by GCC is compatible with threads, but gcc-2.7 was released so long ago that it did not provide an option to perform the extra link steps necessary to support threads: 1) Compile all source files with "-D_THREAD_SAFE" macro defined. 2) Link with "-L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a" to obtain the pthreads support and add "-nostartfiles /usr/lib/crt0_r.o" to the beginning of the link command line (using gcc to link!) to initialize threads.
Send corrections/additions to the FAQ Maintainer:
Last Update May 13 2007 @ 00:21 AM