autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

Re: [patch #7666] ax_pthread macro fails for C++ on Solaris


From: Steven G. Johnson
Subject: Re: [patch #7666] ax_pthread macro fails for C++ on Solaris
Date: Tue, 6 Dec 2011 13:58:24 -0500


On Dec 2, 2011, at 3:17 PM, Daniel Richard G. wrote:
My concern is the redundancy of specifying -D_REENTRANT with cc+"- mt" or
gcc+"-pthreads", as well as cc+"-lpthread", and the lack of "-mt" in
PTHREAD_LIBS.

Redundancy shouldn't hurt; you can always define a symbol like _REENTRANT more than once since its value is irrelevant, only whether or not it is defined.

The ACX_PTHREAD documentation explicitly requires that the user include $PTHREAD_CFLAGS when linking as well as when compiling, so the -mt flag should *not* be included in LIBS too.

(Note that GNU-style Makefiles, e.g. automake + libtool, do indeed include CFLAGS when linking.)

I'm okay with the patch.

--SGJ



reply via email to

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