Hi Niels,

On Sun, Mar 11, 2012 at 6:10 PM, Niels Grewe <niels.grewe@halbordnung.de> wrote:
Hi all,

the GNUstep project maintains an Objective-C runtime library [0] that
also features support for blocks. Until very recently, we were exposing
quite a bit less about the block data structures than the blocks runtime
from compiler-rt, but I just got around to adding them to a public
header. Now it works like a charm with libdispatch and I was hoping that
you might be willing to include the attached patch, which enables the
configure script to detect the presence of a blocks-enabled Objective-C
runtime.


While I am glad to hear you are working on getting blocks support added to GNUstep, I am not sure it makes sense to have a completely different blocks runtime for Objective-C v.s. ordinary C.  Judging by the headers in libobjc2, it looks like you reimplemented the blocks runtime rather than copying it verbatim from compiler-rt. That has me somewhat worried about possible differences and incompatibilities, and I would prefer to use the "official" blocks runtime if possible.

As an alternative, I have repackaged the blocks runtime found in compiler-rt, and made a standalone library named libBlocksRuntime [1].  This is currently used for C/C++ programs that use libdispatch, and I would hope that Objective-C programs could also link against this library.

Any thoughts?

Regards,

 - Mark

[1] http://mark.heily.com/project/libblocksruntime