-lpthread is a no-op on Darwin, but it messes up buildlink. So add a new
flag _OPSYS_PTHREAD_AUTO ("yes" for Darwin, "no" for everyone else) and make pthread.buildlink2.mk do basically nothing in that case.
This commit is contained in:
parent
b9232c142c
commit
7fa2565590
8 changed files with 22 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.Darwin.mk,v 1.54 2003/09/05 13:54:13 martti Exp $
|
||||
# $NetBSD: defs.Darwin.mk,v 1.55 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the Darwin operating system.
|
||||
|
||||
|
@ -112,6 +112,7 @@ _OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
|
|||
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
|
||||
_OPSYS_LIBTOOL_REQD= 1.4.20010614nb12 # base version of libtool required
|
||||
_OPSYS_PERL_REQD= 5.8.0 # base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= yes # -lpthread not needed for pthreads
|
||||
_OPSYS_RPATH_NAME= darwin_has_no_rpath
|
||||
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
||||
_PATCH_BACKUP_ARG= -V simple -b -z # switch to patch(1) for backup suffix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.FreeBSD.mk,v 1.23 2003/09/02 06:59:45 jlam Exp $
|
||||
# $NetBSD: defs.FreeBSD.mk,v 1.24 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the FreeBSD operating system.
|
||||
|
||||
|
@ -127,6 +127,7 @@ _OPSYS_HAS_JAVA= no # Java is not standard
|
|||
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
|
||||
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
|
||||
_OPSYS_PERL_REQD= # no base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
||||
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
|
||||
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
||||
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.IRIX.mk,v 1.32 2003/09/02 06:59:45 jlam Exp $
|
||||
# $NetBSD: defs.IRIX.mk,v 1.33 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the IRIX operating system.
|
||||
|
||||
|
@ -118,6 +118,7 @@ _OPSYS_HAS_OSSAUDIO= no # libossaudio is available
|
|||
_OPSYS_LIBTOOL_REQD= 1.4.20010614nb14 # base version of libtool required
|
||||
_OPSYS_NEEDS_XPKGWEDGE= yes # xpkgwedge is required for X11
|
||||
_OPSYS_PERL_REQD= # no base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
||||
_OPSYS_RPATH_NAME= -rpath, # name of symbol in rpath directive to linker
|
||||
_PATCH_CAN_BACKUP= no # native patch(1) can make backups
|
||||
_PREFORMATTED_MAN_DIR= man # directory where catman pages are
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.Linux.mk,v 1.58 2003/09/05 13:54:14 martti Exp $
|
||||
# $NetBSD: defs.Linux.mk,v 1.59 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the Linux operating system.
|
||||
|
||||
|
@ -161,6 +161,7 @@ _OPSYS_HAS_JAVA= no # Java is not standard
|
|||
_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages
|
||||
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
|
||||
_OPSYS_PERL_REQD= # no base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
||||
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
|
||||
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
||||
_PATCH_BACKUP_ARG= -b -V simple -z # switch to patch(1) for backup suffix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.NetBSD.mk,v 1.52 2003/09/02 06:59:45 jlam Exp $
|
||||
# $NetBSD: defs.NetBSD.mk,v 1.53 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the NetBSD operating system.
|
||||
|
||||
|
@ -123,6 +123,7 @@ _OPSYS_HAS_JAVA= no # Java is not standard
|
|||
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
|
||||
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
|
||||
_OPSYS_PERL_REQD= # no base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
||||
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
|
||||
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
||||
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.OpenBSD.mk,v 1.19 2003/09/02 06:59:46 jlam Exp $
|
||||
# $NetBSD: defs.OpenBSD.mk,v 1.20 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the OpenBSD operating system.
|
||||
|
||||
|
@ -119,6 +119,7 @@ _OPSYS_HAS_JAVA= no # Java is not standard
|
|||
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
|
||||
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
|
||||
_OPSYS_PERL_REQD= # no base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
||||
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
|
||||
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
||||
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: defs.SunOS.mk,v 1.65 2003/09/02 06:59:46 jlam Exp $
|
||||
# $NetBSD: defs.SunOS.mk,v 1.66 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# Variable definitions for the SunOS/Solaris operating system.
|
||||
|
||||
|
@ -127,6 +127,7 @@ _OPSYS_HAS_JAVA= no # Java is not standard
|
|||
_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages
|
||||
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
|
||||
_OPSYS_PERL_REQD= # no base version of perl required
|
||||
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
||||
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
|
||||
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
||||
_PATCH_BACKUP_ARG= -V simple -z # switch to patch(1) for backup suffix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: pthread.buildlink2.mk,v 1.15 2003/09/02 06:59:47 jlam Exp $
|
||||
# $NetBSD: pthread.buildlink2.mk,v 1.16 2003/09/14 16:30:34 danw Exp $
|
||||
#
|
||||
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
|
||||
# package as the Official Pthread Replacement (OPR). A package that uses
|
||||
|
@ -116,7 +116,9 @@ PTHREAD_OPTS?= # empty
|
|||
#
|
||||
.undef PTHREAD_TYPE
|
||||
PREFER_NATIVE_PTHREADS?= YES
|
||||
.if exists(/usr/include/pthread.h) && ${PREFER_NATIVE_PTHREADS} == "YES"
|
||||
.if ${_OPSYS_PTHREAD_AUTO} == "yes"
|
||||
PTHREAD_TYPE= automatic
|
||||
.elif exists(/usr/include/pthread.h) && ${PREFER_NATIVE_PTHREADS} == "YES"
|
||||
PTHREAD_TYPE= native
|
||||
.else
|
||||
. if !empty(PTHREAD_OPTS:Mnative)
|
||||
|
@ -196,6 +198,10 @@ BUILDLINK_LDFLAGS.pthread= -lpthread
|
|||
. else
|
||||
PKG_SKIP_REASON= "${PKGNAME} needs pthreads, but ${_PKG_PTHREAD_BUILDLINK2_MK} is missing."
|
||||
. endif
|
||||
|
||||
.elif ${PTHREAD_TYPE} == "automatic"
|
||||
BUILDLINK_PREFIX.pthread= /usr
|
||||
|
||||
.endif
|
||||
|
||||
# Define user-visible PTHREAD_CFLAGS and PTHREAD_LDFLAGS as compiler
|
||||
|
|
Loading…
Reference in a new issue