apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Rodrigues <rodr...@crodrigues.org>
Subject Re: [PATCH] FreeBSD threads configure support
Date Mon, 10 Nov 2003 06:25:31 GMT
On Sun, Nov 09, 2003 at 11:06:16PM -0700, Paul Querna wrote:
> It doesn't seem correct to always link to libc_r when FreeBSD 5.X has libc_r,
> libkse (M:N mode), libkse (1:1 mode), and libthr.

Well, the patch that I submitted is based on the
the make rules in /usr/ports/Mk/bsd.port.mk.

The general consensus in FreeBSD-land is that if 
a user wishes to change the threading library for a particular
binary, he should explicitly link with -lc_r,
and then use libmap ( see man page for libmap.conf(5) to specify
what library the particular binary should "really" use.

It's quite a mess really, but the patch that I submitted
is the least worst solution.


> It would be nice if the person doing the build was able to select this with a
> configure option, instead of it being hard codeed in there.

They should use libmap.conf.

> (And for the
> FreeBSD ports, I thought there was a system to select which threading library
> to use for the entire ports?)

No there is not.  Look at /usr/ports/Mk/bsd.port.mk.  -lc_r is hardcoded in
there for -CURRENT, and -pthread is hardcoded for older ports.

> 
> Regardless the -pthread does need to be removed, since it has been removed
> from FreeBSD gcc already, but I am not sure hard coding in libc_r is the best
> route to take.

That is the route that the ports people have taken, and
it is what is in /usr/ports/Mk/bsd.port.mk.


-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc@crodrigues.org

Mime
View raw message