[libdispatch-dev] GCD libdispatch w/Blocks support working on FreeBSD

Robert Watson robert at fledge.watson.org
Sat Sep 26 12:37:51 PDT 2009


Dear all:

This is a quick update for those interested in the general portability of 
libdispatch, and perhaps specifically FreeBSD.

With a bit of help from Jordan Hubbard, I now have libdispatch working with 
Blocks on FreeBSD.  Jordan has put up a FreeBSD clang-devel package that 
includes Blocks parts and the C runtime bits here:

   http://static.macosforge.org/libdispatch/downloads/clang-devel.tgz

I've updated the libdispatch build parts to detect and use Blocks when 
compiled with clang, and fixed a few nits in libdispatch that I ran into along 
the way (and one apparent clang bug).  With Jordan's package as a starting 
point, Blocks pretty much "just worked", so I'm optimistic that people will be 
able to reproduce this on other platforms able to run the non-Blocks 
libdispatch without much difficulty.

If you update to at least r45 of libdispatch, you should now be able to do:

   CC=clang ./configure --with-blocks-runtime=/usr/local/lib

and get a libdispatch with Blocks support.

The reason for the configure argument is that the current clang-devel package 
doesn't automatically add libBlocksRuntime dependency for binaries compiled 
with -fblocks.  Once Blocks support shakes out a bit more in clang/FreeBSD, 
this should go away.

I am able to run basic Blocks-based test tools with GCD on FreeBSD without 
difficulty.  The FreeBSD port should be updated to reflect this shortly.

Robert N M Watson
Computer Laboratory
University of Cambridge



More information about the libdispatch-dev mailing list