[91724] trunk/dports/lang/clang-3.1

jeremyhu at macports.org jeremyhu at macports.org
Sun Apr 8 23:30:25 PDT 2012


Revision: 91724
          https://trac.macports.org/changeset/91724
Author:   jeremyhu at macports.org
Date:     2012-04-08 23:30:25 -0700 (Sun, 08 Apr 2012)
Log Message:
-----------
clang-3.1: Buildfix for pre-dispatch cats, #33362

Modified Paths:
--------------
    trunk/dports/lang/clang-3.1/Portfile

Added Paths:
-----------
    trunk/dports/lang/clang-3.1/files/0001-Revert-asan-substitute-extern-decls-with-system-head.patch

Modified: trunk/dports/lang/clang-3.1/Portfile
===================================================================
--- trunk/dports/lang/clang-3.1/Portfile	2012-04-09 06:21:18 UTC (rev 91723)
+++ trunk/dports/lang/clang-3.1/Portfile	2012-04-09 06:30:25 UTC (rev 91724)
@@ -112,6 +112,10 @@
     } else {
         configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
     }
+
+    if {! [file exists /usr/include/dispatch/dispatch.h]} {
+        patchfiles-append 0001-Revert-asan-substitute-extern-decls-with-system-head.patch
+    }
 }
 
 platform darwin 8 {

Added: trunk/dports/lang/clang-3.1/files/0001-Revert-asan-substitute-extern-decls-with-system-head.patch
===================================================================
--- trunk/dports/lang/clang-3.1/files/0001-Revert-asan-substitute-extern-decls-with-system-head.patch	                        (rev 0)
+++ trunk/dports/lang/clang-3.1/files/0001-Revert-asan-substitute-extern-decls-with-system-head.patch	2012-04-09 06:30:25 UTC (rev 91724)
@@ -0,0 +1,56 @@
+From ebb3ceae550d87ce498c324becda59572c51df50 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Sun, 8 Apr 2012 19:41:14 -0700
+Subject: [PATCH] Revert "[asan]: substitute extern decls with system header
+ in asan_mac.cc"
+
+This reverts commit a28aa80ad371d5ab8d7ddd244ad1d695ded29a7e.
+---
+ lib/asan/asan_mac.cc |   16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/projects/compiler-rt/lib/asan/asan_mac.cc b/projects/compiler-rt/lib/asan/asan_mac.cc
+index 96e3bef..6f83e7a 100644
+--- a/projects/compiler-rt/lib/asan/asan_mac.cc
++++ b/projects/compiler-rt/lib/asan/asan_mac.cc
+@@ -23,7 +23,6 @@
+ #include "asan_thread_registry.h"
+ 
+ #include <crt_externs.h>  // for _NSGetEnviron
+-#include <dispatch/dispatch.h>
+ #include <mach-o/dyld.h>
+ #include <mach-o/loader.h>
+ #include <sys/mman.h>
+@@ -439,6 +438,11 @@ mach_error_t __interception_deallocate_island(void *ptr) {
+ 
+ typedef void* pthread_workqueue_t;
+ typedef void* pthread_workitem_handle_t;
++
++typedef void* dispatch_group_t;
++typedef void* dispatch_queue_t;
++typedef uint64_t dispatch_time_t;
++typedef void (*dispatch_function_t)(void *block);
+ typedef void* (*worker_t)(void *block);
+ 
+ // A wrapper for the ObjC blocks used to support libdispatch.
+@@ -449,10 +453,16 @@ typedef struct {
+ } asan_block_context_t;
+ 
+ extern "C" {
+-// dispatch_barrier_async_f() is not declared in <dispatch/dispatch.h>.
++void dispatch_async_f(dispatch_queue_t dq, void *ctxt,
++                      dispatch_function_t func);
++void dispatch_sync_f(dispatch_queue_t dq, void *ctxt,
++                     dispatch_function_t func);
++void dispatch_after_f(dispatch_time_t when, dispatch_queue_t dq, void *ctxt,
++                      dispatch_function_t func);
+ void dispatch_barrier_async_f(dispatch_queue_t dq, void *ctxt,
+                               dispatch_function_t func);
+-// Neither is pthread_workqueue_additem_np().
++void dispatch_group_async_f(dispatch_group_t group, dispatch_queue_t dq,
++                            void *ctxt, dispatch_function_t func);
+ int pthread_workqueue_additem_np(pthread_workqueue_t workq,
+     void *(*workitem_func)(void *), void * workitem_arg,
+     pthread_workitem_handle_t * itemhandlep, unsigned int *gencountp);
+-- 
+1.7.9.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120408/9d04d766/attachment.html>


More information about the macports-changes mailing list