From cca7c39910932b5444c0ce46775e8c6ce2d62f06 Mon Sep 17 00:00:00 2001 From: Stanislav Sedov Date: Mon, 14 Dec 2009 21:48:06 +0000 Subject: [PATCH] - Fix build with CLang. --- devel/libdispatch/Makefile | 8 ++------ devel/libdispatch/files/patch-configure | 11 +++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 devel/libdispatch/files/patch-configure diff --git a/devel/libdispatch/Makefile b/devel/libdispatch/Makefile index fa4955f4bf30..97fdf2368768 100644 --- a/devel/libdispatch/Makefile +++ b/devel/libdispatch/Makefile @@ -18,7 +18,7 @@ GNU_CONFIGURE= yes USE_BZIP2= yes USE_LDCONFIG= yes -OPTIONS= CLANG "Build with LLVM/Clang (required for blocks support)" off +OPTIONS= CLANG "Build with LLVM/Clang (required for blocks support)" on MAN3= dispatch.3 dispatch_after.3 dispatch_api.3 dispatch_apply.3 \ dispatch_async.3 dispatch_benchmark.3 dispatch_group_create.3 \ @@ -80,11 +80,7 @@ post-configure: IGNORE= is not supported on this OS version .endif -.if defined(WITH_CLANG) -BROKEN= does not compile -.endif - -.if defined(WITH_CLANG) +.if !defined(WITHOUT_CLANG) BUILD_DEPENDS+= clang:${PORTSDIR}/devel/llvm-devel \ ${LOCALBASE}/lib/libBlocksRuntime.so:${PORTSDIR}/devel/compiler-rt RUN_DEPENDS+= clang:${PORTSDIR}/devel/llvm-devel \ diff --git a/devel/libdispatch/files/patch-configure b/devel/libdispatch/files/patch-configure new file mode 100644 index 000000000000..5e1afe1e76fc --- /dev/null +++ b/devel/libdispatch/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2009-12-14 13:44:05.000000000 -0800 ++++ configure 2009-12-14 13:45:02.000000000 -0800 +@@ -19325,7 +19325,7 @@ + # should force that linkage already. + # + saveCFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -fblocks" ++ CFLAGS="$CFLAGS -fblocks -O0" + { $as_echo "$as_me:$LINENO: checking whether additional libraries are required for the Blocks runtime" >&5 + $as_echo_n "checking whether additional libraries are required for the Blocks runtime... " >&6; } + cat >conftest.$ac_ext <<_ACEOF