Comments about FreeBSD threading from Apache people
Craig Rodrigues
rodrigc at crodrigues.org
Mon Nov 10 06:00:49 PST 2003
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 at crodrigues.org
More information about the freebsd-threads
mailing list