bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New module pthread


From: Michael Haubenwallner
Subject: Re: New module pthread
Date: Fri, 27 Mar 2009 16:15:47 +0100

On Thu, 2009-03-26 at 01:01 +0100, Bruno Haible wrote:
> - pthread.m4 assumes that in order to use threads, it is only necessary to
>   add some library at link time. But this is not enough:
>     - On OSF/1 and Solaris, -D_REENTRANT needs to be added to CPPFLAGS.
>     - On AIX and FreeBSD, -D_THREAD_SAFE needs to be added to CPPFLAGS.
>   See m4/threadlib.m4 for details.

When using gcc, IIRC the most correct way is to add nothing else but
'-pthread' or '-pthreads' (platform dependant) to all preprocess-,
compile-, and link-line.

In my self built gcc, I'm patching gcc-source to have the pthread-flag
enabled always, because I did have troubles when linking with-pthread-
and without-pthread-built libraries together into one binary.
Best example is older gcc on AIX, where different libstdc++ and libgcc_s
were required for with- or without-pthread.

/haubi/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]