Subject: Re: -pthread, -lgthread and libtool
To: None <>
From: Joerg Sonnenberger <>
List: tech-pkg
Date: 05/17/2005 22:04:48
On Tue, May 17, 2005 at 04:45:27PM +0200, Joerg Sonnenberger wrote:
> I'm running into strange interactions between libtool and pkgconfig.
> An application which links against libgthread needs to link against
> the system thread library, on DragonFly this is [historically] done
> via -pthread. This flag is not recorded in the dependency list
> of, but is correctly determined by pkgconfig.

I think I traced this down to:
pkg-config --libs-only-other --libs-only-l gthread-2.0
-lgthread-2.0 -lglib-2.0  

pkg-config --libs-only-other gthread-2.0
-Wl,-R/usr/pkg/lib -pthread  

pkg-config --libs-only-l gthread-2.0
-lgthread-2.0 -lglib-2.0  

Is the behaviour of the first case desired? Shouldn't it be additive?