gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -lpthread


From: David Ayers
Subject: Re: -lpthread
Date: Thu, 05 Jun 2008 11:17:03 +0200
User-agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)

Richard Frith-Macdonald schrieb:
> 
> On 3 Jun 2008, at 17:25, David Chisnall wrote:
> 
> Looking at configure.ac in gnustep-make, it appears that, unless the
> --with-thread-lib= command-line argument is used to explicitly override
> normal behavior, -pthread is only used on freebsd ... so I don't see how
> anyone could have a problem with -pthread on Ubuntu.
> 
> On free bsd, it tries to check that the objc runtime thread support
> works using first -pthread, then -lpthread, then -lpcthread
> 
> What happens for you if you hack gnustep-make's configure.ac (and run
> autoconf to generate a new configure script) so that in the freebsd case
> it tests for -lpthread before it tests for -pthread ?
> You could also see if '-pthread -lpthread' works... perhaps changing
> gnustep-make to try that instead of just '-pthread' would solve your
> problem.

I believe the issue is that historically the libobjc runtime could be
used with different threading libraries for its threading API.  But if I
remember correctly, currently only POSIX Threads are supported.  I'm not
100% sure anymore so some would have to investigate, but I think the
approach to really fix the issue is that we need

A) to introduce a generic threading option to gcc that will add/select
the correct linker flags for threading support which was compiled into
libobjc.

B) to introduce something like an libobjc-config script in libobjc that
our configure scripts can use to figure out the correct flags for the
platform we are working with.

Cheers,
David

PS: I don't have the time to deal with this so I'd be grateful is
someone could pick this up.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]