Date: Mon, 10 Nov 2003 09:02:39 -0500 From: Craig Rodrigues <rodrigc@crodrigues.org> To: Daniel Eischen <eischen@vigrid.com> Cc: freebsd-threads@freebsd.org Subject: Re: Comments about FreeBSD threading from Apache people Message-ID: <20031110140239.GA67109@crodrigues.org> In-Reply-To: <Pine.GSO.4.10.10311100854050.6872-100000@pcnet5.pcnet.com> References: <20031110070111.GA65707@crodrigues.org> <Pine.GSO.4.10.10311100854050.6872-100000@pcnet5.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 10, 2003 at 08:56:41AM -0500, Daniel Eischen wrote:
> There's not enough info in STATUS to go on, and in any case it
> is written against libc_r. Tell them about libpthread^Wlibkse.
> David Xu has tested apache with threading enabled.
Well, Apache guys complained, because I submitted the following
patch that:
(1) took out the configure stuff which disabled threads in apr for
FreeBSD
(2) put in "-pthread" link flag for -STABLE, and "-lc_r" for -CURRENT
My patch was based on what is in /usr/ports/Mk/bsd.port.mk.
I submitted this patch to our own devel/apr port, since
without it, dependent ports like subversion are breaking.
I think they don't want to enable threads by default,
because of the threading situation on -STABLE.
Index: apr_hints.m4
===================================================================
RCS file: /home/cvspublic/apr/build/apr_hints.m4,v
retrieving revision 1.53
diff -u -r1.53 apr_hints.m4
--- apr_hints.m4 2 Jun 2003 15:52:28 -0000 1.53
+++ apr_hints.m4 9 Nov 2003 23:27:11 -0000
@@ -130,14 +130,15 @@
APR_ADDTO(CPPFLAGS, [-DNETBSD])
;;
*-freebsd*)
- case $host in
- *freebsd[2345]*)
- APR_ADDTO(CFLAGS, [-funsigned-char])
- ;;
- esac
- APR_SETIFNULL(enable_threads, [no])
+ os_version=`sysctl -n kern.osreldate`
+ APR_ADDTO(CFLAGS, [-funsigned-char])
APR_SETIFNULL(apr_lock_method, [USE_FLOCK_SERIALIZE])
- APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_THREAD_SAFE])
+ if test $os_version -lt "500016"; then
+ ac_cv_pthreads_cflags="-D_THREAD_SAFE -D_REENTRANT"
+ APR_ADDTO(LIBS, [-pthread])
+ else
+ ac_cv_pthreads_lib="c_r"
+ fi
;;
*-next-nextstep*)
APR_SETIFNULL(CFLAGS, [-O])
--
Craig Rodrigues
http://crodrigues.org
rodrigc@crodrigues.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031110140239.GA67109>
