tech-pkg archive

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

Re: any objections to adding -D_PTHREADS in mk/pthread.builtin.mk and pthread.buildlink.mk



Le 10/10/13 08:24, Martin Husemann a écrit :
On Thu, Oct 10, 2013 at 07:40:44AM +0200, Richard PALO wrote:
Certain pthreads based applications specifically check for _PTHREADS
being defined, such as boost on solaris in which absence of this
CPPFLAGS issues this type of message:

The compiler is supposed to define that when used with -pthread:

    gcc -pthread -dM -E - < /dev/null | fgrep _PTHREADS

and compare w/o -pthread. If your compiler doesn't do that, add it to a
OS/compiler specific section, as Obata suggested.

Martin

This works, so I'll go back to what I originally tried but figured that after so many years it would have already been dealt with there:
richard@devzone:~/src/pkgsrc/mk$ git diff .
diff --git a/mk/pthread.builtin.mk b/mk/pthread.builtin.mk
index 733edc9..03810d5 100644
--- a/mk/pthread.builtin.mk
+++ b/mk/pthread.builtin.mk
@@ -61,7 +61,7 @@ BUILDLINK_LDFLAGS.pthread=    # empty
 # XXX
 # XXX This should really be a check for GCC!
 # XXX
-BUILDLINK_OPSYS_SUPPORT_PTHREAD=       DragonFly FreeBSD Linux MirBSD NetBSD 
OpenBSD
+BUILDLINK_OPSYS_SUPPORT_PTHREAD=       DragonFly FreeBSD Linux MirBSD NetBSD 
OpenBSD SunOS
 .    if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS})
 BUILDLINK_CFLAGS.pthread+=     -pthread
 BUILDLINK_LDFLAGS.pthread+=    -pthread


OKAY?




Home | Main Index | Thread Index | Old Index