Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/10.5-EOL/languages
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15402

Modified Files:
        llvm33.info llvm33.patch 
Log Message:
sync. w/ 10.4-EOL, properly fixing conditionals on context members in 
compiler-rt/asam_mac.cc


Index: llvm33.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4/stable/main/finkinfo/10.5-EOL/languages/llvm33.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- llvm33.info 7 Jul 2013 23:07:10 -0000       1.1
+++ llvm33.info 10 Oct 2013 00:19:24 -0000      1.2
@@ -46,7 +46,7 @@
 UseMaxBuildJobs: true
 
 PatchFile: %n.patch
-PatchFile-MD5: 719586edb9e0d0e7e8d4c691f7c89757
+PatchFile-MD5: a6516602b5d3b4d1c87f7f401c121b59
 PatchScript: <<
        #!/bin/sh -ev
        darwin_vers=`uname -r | cut -d. -f1`

Index: llvm33.patch
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4/stable/main/finkinfo/10.5-EOL/languages/llvm33.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- llvm33.patch        7 Jul 2013 23:07:10 -0000       1.1
+++ llvm33.patch        10 Oct 2013 00:19:24 -0000      1.2
@@ -2319,39 +2319,71 @@
  using namespace __asan;  // NOLINT
  
  #define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \
+
 diff --git a/projects/compiler-rt/lib/asan/asan_mac.cc 
b/projects/compiler-rt/lib/asan/asan_mac.cc
-index 63fb5f6..a3c5659 100644
+index 9200837..903e0d5 100644
 --- a/projects/compiler-rt/lib/asan/asan_mac.cc
 +++ b/projects/compiler-rt/lib/asan/asan_mac.cc
-@@ -37,19 +37,30 @@
+@@ -36,21 +36,58 @@
+ #include <pthread.h>
+ #include <stdlib.h>  // for free()
  #include <unistd.h>
++#ifdef        __APPLE__
  #include <libkern/OSAtomic.h>
- 
-+#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 2)
-+#define       MISSING_BLOCKS_SUPPORT
 +#endif
 +
++#ifdef        __APPLE__
++#define       __DARWIN_VERSION__      ((MAC_OS_X_VERSION_MIN_REQUIRED - 
MAC_OS_X_VERSION_10_0)/10 +4)
++#else
++#define       __DARWIN_VERSION__      0
++#endif
++
++// Looks like blocks/dispatch became available 10.6 and later.
++#if __DARWIN_VERSION__ && (__DARWIN_VERSION__ < 10)
++#define       MISSING_BLOCKS_SUPPORT
++#endif
+ 
  namespace __asan {
  
++// adjusting for different struct member names on darwin8
++// see /usr/include/i386/_structs.h on darwin9+
++// see /usr/include/i386/ucontext.h on darwin8
++#if   __DARWIN_VERSION__ && (!__DARWIN_UNIX03 || (__DARWIN_VERSION__ < 9))
++#define       STATE_MEM               ss
++#else
++#define       STATE_MEM               __ss
++#endif
++
++// see /usr/include/mach/i386/_structs.h on darwin9+
++// see /usr/include/mach/i386/thread_status.h on darwin8
++#if   defined(__APPLE__) && (!__DARWIN_UNIX03 || (__DARWIN_VERSION__ < 9))
++#define       X86_THREAD_MEM(x)       x
++#else
++#define       X86_THREAD_MEM(x)       __ ## x
++#endif
++
  void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
    ucontext_t *ucontext = (ucontext_t*)context;
 +#if defined(__ppc__) || defined(__ppc64__)
-+  *pc = ucontext->uc_mcontext->ss.srr0;
-+  *bp = ucontext->uc_mcontext->ss.r1;         // or r31
++  *pc = ucontext->uc_mcontext->STATE_MEM.srr0;
++  *bp = ucontext->uc_mcontext->STATE_MEM.r1;          // or r31
 +      // powerpc has no dedicated frame pointer
-+  *sp = ucontext->uc_mcontext->ss.r1;
++  *sp = ucontext->uc_mcontext->STATE_MEM.r1;
 +#else
  # if SANITIZER_WORDSIZE == 64
-   *pc = ucontext->uc_mcontext->__ss.__rip;
-   *bp = ucontext->uc_mcontext->__ss.__rbp;
-   *sp = ucontext->uc_mcontext->__ss.__rsp;
+-  *pc = ucontext->uc_mcontext->__ss.__rip;
+-  *bp = ucontext->uc_mcontext->__ss.__rbp;
+-  *sp = ucontext->uc_mcontext->__ss.__rsp;
++  *pc = ucontext->uc_mcontext->STATE_MEM.X86_THREAD_MEM(rip);
++  *bp = ucontext->uc_mcontext->STATE_MEM.X86_THREAD_MEM(rbp);
++  *sp = ucontext->uc_mcontext->STATE_MEM.X86_THREAD_MEM(rsp);
  # else
 -  *pc = ucontext->uc_mcontext->__ss.__eip;
 -  *bp = ucontext->uc_mcontext->__ss.__ebp;
 -  *sp = ucontext->uc_mcontext->__ss.__esp;
-+  *pc = ucontext->uc_mcontext->ss.eip;
-+  *bp = ucontext->uc_mcontext->ss.ebp;
-+  *sp = ucontext->uc_mcontext->ss.esp;
++  *pc = ucontext->uc_mcontext->STATE_MEM.X86_THREAD_MEM(eip);
++  *bp = ucontext->uc_mcontext->STATE_MEM.X86_THREAD_MEM(ebp);
++  *sp = ucontext->uc_mcontext->STATE_MEM.X86_THREAD_MEM(esp);
  # endif  // SANITIZER_WORDSIZE
 +#endif
  }


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to