[Buildroot] [PATCH] dbus: use -pthread instead of -lpthread
thomas.petazzoni at free-electrons.com
Mon Jun 30 18:06:16 UTC 2014
Dear Vicente Olivert Riera,
On Mon, 30 Jun 2014 17:54:27 +0100, Vicente Olivert Riera wrote:
> >> ifeq ($(BR2_PREFER_STATIC_LIB),y)
> >> -DBUS_CONF_OPT += LIBS='-lpthread'
> >> +DBUS_CONF_OPT += LIBS='-pthread'
> > Can you explain how this change solves the build failure?
> Yes. When dnsmasq tries to link against dbus it checks the dbus
> pkgconfig file to obtain the LIBS that it need to pass to the linker. In
> the dbus .pc file you have "-ldbus-1 -lpthread" because you used
> -lpthread when building dbus. If you use -pthread when you build dbus,
> then you will have -pthread in the dbus .pc file as well.
I think it'd be good to have an updated version of the patch that gives
this explanation + an explanation of the difference between -pthread
and -lpthread and how this difference solves the problem.
Also, would it be possible to get this bug fixed in upstream DBus?
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
More information about the buildroot