[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying to use GNUstep and libdispatch in an ARC based objective-C pr
Re: Trying to use GNUstep and libdispatch in an ARC based objective-C program
Wed, 8 Jan 2014 12:17:43 +0000
On 8 Jan 2014, at 09:32, Quentin Mathé <address@hidden> wrote:
> It seems libdispatch ObjC integration is not compatible with libobjc2 as it
> is. When compiling code that uses libdispatch, I pass -DOS_OBJECT_USE_OBJC=0
> to the CPPFLAGS, in order to disable the libdispatch ObjC integration.
It would be nice for us to support that. As I understand it, the only thing
missing is treating the libdispatch types as ARC-compatible types?
> Based on my experience, this repository requires various changes to compile
> and work correctly on GNUstep. Some GNUstep people have submitted changes but
> they haven't been accepted yet.
> I maintain a fork of this repository patched with GNUstep+libobjc2 support
> here: http://svn.gna.org/viewcvs/etoile/trunk/Dependencies/libdispatch-objc2/
This patch shouldn't be needed. I use libdispatch on FreeBSD, and it links
against libBlockRuntime but then these symbols are weak so they're just
replaced if you also link to libobjc. There's absolutely no reason to use the
libobjc2 headers instead of the BlocksRuntime headers, even if you're linking
to libobjc instead of libBlocksRuntime.
> The changes I did are listed in this patch:
> The main change is rewriting FindCBlocks.cmake to pick either
> libBlocksRuntime or libobjc2, depending on what is available on the host
> For the install instructions, see:
> Another major problem that remains unsovled lies the fact that GNUstep Base
> doesn't attempt to detect libdispatch, and compile NSOperation and
> NSOperationQueue with libdispatch support enabled. As a result, you have to
> stick to the libdispatch C API.
-base actually does detect libdispatch and uses it for a few things (e.g.
parallel iteration with NSArray), but it doesn't use it for NSRunLoop or
NSOperationQueue - both of these would be nice to add.
-- Sent from my Apple II