pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk when using native threads, only set BUILDLINK_CFLAG...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/836299a3a86a
branches:  trunk
changeset: 476500:836299a3a86a
user:      grant <grant%pkgsrc.org@localhost>
date:      Sat Jun 12 03:19:52 2004 +0000

description:
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:

 mk/pthread.buildlink2.mk |   8 +++++++-
 mk/pthread.buildlink3.mk |  12 ++++++++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diffs (50 lines):

diff -r 2e4bfadd986a -r 836299a3a86a mk/pthread.buildlink2.mk
--- a/mk/pthread.buildlink2.mk  Sat Jun 12 03:02:27 2004 +0000
+++ b/mk/pthread.buildlink2.mk  Sat Jun 12 03:19:52 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink2.mk,v 1.16 2003/09/14 16:30:34 danw Exp $
+# $NetBSD: pthread.buildlink2.mk,v 1.17 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
@@ -154,7 +154,13 @@
 BUILDLINK_TARGETS+=            pthread-buildlink
 BUILDLINK_TARGETS+=            pthread-buildlink-la
 
+# 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.
diff -r 2e4bfadd986a -r 836299a3a86a mk/pthread.buildlink3.mk
--- a/mk/pthread.buildlink3.mk  Sat Jun 12 03:02:27 2004 +0000
+++ b/mk/pthread.buildlink3.mk  Sat Jun 12 03:19:52 2004 +0000
@@ -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 @@
 # 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.



Home | Main Index | Thread Index | Old Index