summaryrefslogtreecommitdiff
path: root/mk/pthread.buildlink3.mk
diff options
context:
space:
mode:
authorgrant <grant>2004-06-12 03:19:52 +0000
committergrant <grant>2004-06-12 03:19:52 +0000
commita3d5a65338b93234fb135acf0d6966d2470a4e9a (patch)
tree497e04b5f1b837b3a85cbe0c16108e375d4becfb /mk/pthread.buildlink3.mk
parent97558f486debabb295257c057de08e6ce4d4f612 (diff)
downloadpkgsrc-a3d5a65338b93234fb135acf0d6966d2470a4e9a.tar.gz
when using native threads, only set BUILDLINK_CFLAGS.pthread=-pthread on
systems known to support its (FreeBSD, NetBSD, Linux). fixes breakage caused by passing -pthread to SunPro cc(1) and likely also fixes platforms other than the above.
Diffstat (limited to 'mk/pthread.buildlink3.mk')
-rw-r--r--mk/pthread.buildlink3.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/pthread.buildlink3.mk b/mk/pthread.buildlink3.mk
index beb1d53a4ec..ba2b2fd0ca4 100644
--- a/mk/pthread.buildlink3.mk
+++ b/mk/pthread.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink3.mk,v 1.5 2004/03/31 20:18:46 seb Exp $
+# $NetBSD: pthread.buildlink3.mk,v 1.6 2004/06/12 03:19:52 grant Exp $
#
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
# package as the Official Pthread Replacement (OPR). A package that uses
@@ -145,8 +145,16 @@ PKG_SKIP_REASON= "${PKGNAME} requires a working pthreads implementation."
# Link the native pthread libraries and headers into ${BUILDLINK_DIR}.
#
BUILDLINK_PREFIX.pthread= /usr
-BUILDLINK_CFLAGS.pthread= -pthread
BUILDLINK_LDFLAGS.pthread= # empty
+
+# only pass -pthread on platforms known to support it.
+. if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || \
+ ${OPSYS} == "NetBSD"
+BUILDLINK_CFLAGS.pthread= -pthread
+. else
+BUILDLINK_CFLAGS.pthread= # empty
+. endif
+
#
# Handle systems which have pthreads functions in libc_r such as
# FreeBSD 5.x, or fall back to libc if we don't find libc_r.