From owner-freebsd-threads@FreeBSD.ORG Mon Nov 10 06:00:48 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9F7E16A4CE for ; Mon, 10 Nov 2003 06:00:48 -0800 (PST) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [66.31.45.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id B946D43FAF for ; Mon, 10 Nov 2003 06:00:47 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])hAAE2eD7067151; Mon, 10 Nov 2003 09:02:40 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)hAAE2dUH067150; Mon, 10 Nov 2003 09:02:39 -0500 (EST) (envelope-from rodrigc) Date: Mon, 10 Nov 2003 09:02:39 -0500 From: Craig Rodrigues To: Daniel Eischen Message-ID: <20031110140239.GA67109@crodrigues.org> References: <20031110070111.GA65707@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i cc: freebsd-threads@freebsd.org Subject: Re: Comments about FreeBSD threading from Apache people X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2003 14:00:49 -0000 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