Update of /cvsroot/fink/experimental/fangism/finkinfo In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14095
Modified Files: llvm33.info llvm33.patch Log Message: update patch to build on i386-darwin8 (asan_mac.cc) Index: llvm33.info =================================================================== RCS file: /cvsroot/fink/experimental/fangism/finkinfo/llvm33.info,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- llvm33.info 28 Jun 2013 00:16:59 -0000 1.5 +++ llvm33.info 24 Jul 2013 00:55:16 -0000 1.6 @@ -46,7 +46,7 @@ UseMaxBuildJobs: true PatchFile: %n.patch -PatchFile-MD5: 719586edb9e0d0e7e8d4c691f7c89757 +PatchFile-MD5: 18c2dbdfb339e3781c52ac4ec181e2d0 PatchScript: << #!/bin/sh -ev darwin_vers=`uname -r | cut -d. -f1` Index: llvm33.patch =================================================================== RCS file: /cvsroot/fink/experimental/fangism/finkinfo/llvm33.patch,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- llvm33.patch 27 Jun 2013 22:30:16 -0000 1.2 +++ llvm33.patch 24 Jul 2013 00:55:16 -0000 1.3 @@ -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,23 +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 } ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs