Hi

On 2013-11-11 18:49:01, Laurent Bigonville wrote:
> > > OK for what I understood, the A(C)X_PTHREAD is setting the -pthread
> > > flag (not the absence of "l") in PTHREAD_CFLAGS and relies on gcc
> > > to do the correct thing(tm) when this flag is set, this works the
> > > cases where the CFLAGS are also passed at the linking time (autofoo
> > > are doing that).
> > > 
> > > If a pkg that link against check FTBFS this need to be checked.
> > > 
> > > I feel that this bug should be fixed now and could be closed, all
> > > rdeps seems to compile now
> > 
> > I don't think this bug can be closed. pkg-config check --libs still
> > doesn't include -pthread which it should. -pthread needs to in both
> > Cflags and Libs in check's pkgconfig file.
> 
> The ax_pthread macro upstream thinks otherwise, see:
> https://savannah.gnu.org/patch/?8081
>
> But I can admit, I've not seen a lot of projects doing it that way.
> 
> If I understood correctly, -pthread should automatically make gcc link
> against libpthread. So as said the CFLAGS should also be passed to gcc
> at linking time, in that case explicit -lpthread flag seems redundant.

Of course, passing -pthread to gcc during link time does the right
thing. I would still expect to get -pthread (not -lpthread) from
`pkg-config check --libs`. My understanding of --libs is that it's
supposed to give the required linking flags. In the case of check,
-pthread is required while linking, but is not included in the output of
--libs.

Regards
-- 
Sebastian Ramacher

Attachment: signature.asc
Description: Digital signature

Reply via email to