Date: Thu, 08 Feb 2001 21:29:43 +0200 From: Maxim Sobolev <sobomax@FreeBSD.org> To: ports@FreeBSD.org, asami@FreeBSD.org Subject: Request for comment: bsd.port.mk and recent pthreads changes Message-ID: <3A82F3A7.9F7BB427@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi,
As you may know recent changes in the pthreads (depreciation of -pthread flag)
made necessary to ajust many ports from our ports collection. This change would
be conditional, as older versions of the FreeBSD still need this flag.
Therefore it would be nice to have some support for that from the bsd.port.mk,
because it's not very handy to put the same conditional in every single port
that use pthreads. With this message I'm attaching patch that represents my
vision of such support. I would like to hear comments on it and theoretically
get it (or something like it) committed in the nearest future.
Thanks!
-Maxim
[-- Attachment #2 --]
--- bsd.port.mk 2001/02/08 19:09:54 1.2
+++ bsd.port.mk 2001/02/08 19:15:50
@@ -948,6 +948,14 @@
MAKEFILE?= Makefile
MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+.if ${OSVERSION} < 500000
+PTHREAD_CFLAGS= -D_THREAD_SAFE
+PTHREAD_LIBS= "-pthread"
+.else
+PTHREAD_CFLAGS= ""
+PTHREAD_LIBS= "-lc_r"
+.endif
+
.if exists(/usr/bin/fetch)
# avoid -A for 2.2 -- it's not ported to that branch
.if ${OSVERSION} < 300000
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A82F3A7.9F7BB427>
