From c4e3c8cd15f6b5bfa8da0d39262adfa1fc19a37a Mon Sep 17 00:00:00 2001 From: grant Date: Sat, 12 Jun 2004 03:19:52 +0000 Subject: 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. --- mk/pthread.buildlink3.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mk/pthread.buildlink3.mk') 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. -- cgit v1.2.3