[141828] trunk/dports/lang/llvm-3.8

jeremyhu at macports.org jeremyhu at macports.org
Sat Dec 12 03:10:50 PST 2015


Revision: 141828
          https://trac.macports.org/changeset/141828
Author:   jeremyhu at macports.org
Date:     2015-10-29 08:20:41 -0700 (Thu, 29 Oct 2015)
Log Message:
-----------
llvm-3.8: Bump to current master and fix build on older systems (#49477)

Modified Paths:
--------------
    trunk/dports/lang/llvm-3.8/Portfile
    trunk/dports/lang/llvm-3.8/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch
    trunk/dports/lang/llvm-3.8/files/2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch
    trunk/dports/lang/llvm-3.8/files/2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch
    trunk/dports/lang/llvm-3.8/files/2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch
    trunk/dports/lang/llvm-3.8/files/2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch
    trunk/dports/lang/llvm-3.8/files/2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch

Added Paths:
-----------
    trunk/dports/lang/llvm-3.8/files/2007-ASan-build-fix-for-older-OS-versions-without-os-trac.patch
    trunk/dports/lang/llvm-3.8/files/2008-Save-the-ASan-report-in-the-OS-X-crash-log.patch

Removed Paths:
-------------
    trunk/dports/lang/llvm-3.8/files/2007-Save-the-ASan-report-in-the-OS-X-crash-log.patch

Modified: trunk/dports/lang/llvm-3.8/Portfile
===================================================================
--- trunk/dports/lang/llvm-3.8/Portfile	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/Portfile	2015-10-29 15:20:41 UTC (rev 141828)
@@ -64,7 +64,7 @@
 }
 
 fetch.type              svn
-svn.revision            251269
+svn.revision            251619
 
 set compiler_rt_rev     ${svn.revision}
 set libcxx_rev          ${svn.revision}
@@ -120,7 +120,8 @@
         2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch \
         2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch \
         2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch \
-        2007-Save-the-ASan-report-in-the-OS-X-crash-log.patch \
+        2007-ASan-build-fix-for-older-OS-versions-without-os-trac.patch \
+        2008-Save-the-ASan-report-in-the-OS-X-crash-log.patch \
         3001-buildit-build-fix-for-Leopard.patch \
         3002-buildit-Set-compatibility-version-to-RC_ProjectSourc.patch \
         3003-Fix-local-and-iterator-when-building-with-Lion-and-n.patch \
@@ -410,10 +411,11 @@
         file delete -force ${destroot}${sub_prefix}/libexec/clang-format/CMakeLists.txt
         file delete -force ${destroot}${sub_prefix}/libexec/clang-format/ClangFormat.cpp
 
-        system "install_name_tool -id @rpath/libclang_rt.asan_iossim_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib"
-        system "install_name_tool -id @rpath/libclang_rt.asan_osx_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib"
-        system "install_name_tool -id @rpath/libclang_rt.ubsan_iossim_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib"
-        system "install_name_tool -id @rpath/libclang_rt.ubsan_osx_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib"
+        set clangrtpath "${destroot}${sub_prefix}/lib/clang/${llvm_version}/lib/darwin"
+        foreach file [glob ${clangrtpath}/*.dylib] {
+            set basename [string map "${clangrtpath}/ {}" ${file}]
+            system "install_name_tool -id @rpath/${basename} ${file}"
+        }
     }
 }
 

Modified: trunk/dports/lang/llvm-3.8/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,7 +1,7 @@
-From a321b5175583de50ac1239776a54ddf5b95cf651 Mon Sep 17 00:00:00 2001
+From d2b296ccf11795a4285193428d24792fe3cb56ad Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Mon, 15 Apr 2013 22:38:18 -0700
-Subject: [PATCH 2001/2007] MacPorts Only: Comment out SL cctools workaround
+Subject: [PATCH 2001/2008] MacPorts Only: Comment out SL cctools workaround
 
 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 ---

Modified: trunk/dports/lang/llvm-3.8/files/2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2002-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,7 +1,7 @@
-From 2292a6f81d1f49f3fdfa9d325fa994f676252591 Mon Sep 17 00:00:00 2001
+From cbe667aa54b998d43aa7e7a3cd29ca8f27453abd Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Sat, 10 Jan 2015 03:34:51 -0800
-Subject: [PATCH 2002/2007] Update CheckArches to fallback on Intel/ppc if ld
+Subject: [PATCH 2002/2008] Update CheckArches to fallback on Intel/ppc if ld
  -v doesn't report supported architectures
 
 Older versions of ld64 (eg: Xcode 3.x) do not report this.

Modified: trunk/dports/lang/llvm-3.8/files/2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2003-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,7 +1,7 @@
-From 7d4590c76d48df29165a93704765922e514972e8 Mon Sep 17 00:00:00 2001
+From e13a535302239c487d3bb5ce5b34bb1b6695f091 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Sat, 17 Jan 2015 17:45:27 -0800
-Subject: [PATCH 2003/2007] Fall back on xcodebuild -sdk when xcrun --sdk is
+Subject: [PATCH 2003/2008] Fall back on xcodebuild -sdk when xcrun --sdk is
  not supported
 
 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>

Modified: trunk/dports/lang/llvm-3.8/files/2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2004-On-darwin-build-ppc-slices-of-the-compiler-runtime-i.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,7 +1,7 @@
-From e4b2ca3c0b7864503b69c6dd4ca8a08d82672ddc Mon Sep 17 00:00:00 2001
+From 77a697e1fc15f2120b41fd44e62886624f15a47e Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Sat, 17 Jan 2015 19:55:19 -0800
-Subject: [PATCH 2004/2007] On darwin, build ppc slices of the compiler runtime
+Subject: [PATCH 2004/2008] On darwin, build ppc slices of the compiler runtime
  if requested and supported by the SDK and toolchain
 
 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>

Modified: trunk/dports/lang/llvm-3.8/files/2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2005-MacPorts-Only-Don-t-build-x86_64h-slice-of-compiler-.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,7 +1,7 @@
-From 54d35960b799a78ead02b4288ee4de7e4a92d8c9 Mon Sep 17 00:00:00 2001
+From ea53b2fabf499870a51c8a8ec0de22a33193613a Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Wed, 14 Jan 2015 19:55:19 -0800
-Subject: [PATCH 2005/2007] MacPorts Only: Don't build x86_64h slice of
+Subject: [PATCH 2005/2008] MacPorts Only: Don't build x86_64h slice of
  compiler-rt
 
 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>

Modified: trunk/dports/lang/llvm-3.8/files/2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2006-MacPorts-Only-Fix-regression-introduced-when-fixing-.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,7 +1,7 @@
-From 960ad7a967a124a32360f15b7f33d1d1842d44ce Mon Sep 17 00:00:00 2001
+From 4ed7840e485af03baffb9a983f613ac76fad66d3 Mon Sep 17 00:00:00 2001
 From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
 Date: Sun, 11 Oct 2015 09:02:26 -0700
-Subject: [PATCH 2006/2007] MacPorts Only: Fix regression introduced when
+Subject: [PATCH 2006/2008] MacPorts Only: Fix regression introduced when
  fixing PR24776
 
 Partially reverts commit efecb2c285bd444b6def43ac62e5f0278df387eb

Added: trunk/dports/lang/llvm-3.8/files/2007-ASan-build-fix-for-older-OS-versions-without-os-trac.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2007-ASan-build-fix-for-older-OS-versions-without-os-trac.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.8/files/2007-ASan-build-fix-for-older-OS-versions-without-os-trac.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -0,0 +1,49 @@
+From 7cd92c21dd373486584066fe4630b10c9bbb85b7 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Thu, 29 Oct 2015 00:06:52 -0700
+Subject: [PATCH 2007/2008] ASan build fix for older OS versions without
+ os/trace.h
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+---
+ lib/sanitizer_common/sanitizer_mac.cc | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git llvm_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc macports_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+index 951a48a..49e0c7c 100644
+--- llvm_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
++++ macports_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+@@ -43,7 +43,14 @@ extern char **environ;
+ #include <mach-o/dyld.h>
+ #include <mach/mach.h>
+ #include <mach/vm_statistics.h>
++
++#if __has_include(<os/trace.h>)
++#define SANITIZER_OS_TRACE 1
+ #include <os/trace.h>
++#else
++#define SANITIZER_OS_TRACE 0
++#endif
++
+ #include <pthread.h>
+ #include <sched.h>
+ #include <signal.h>
+@@ -381,6 +388,7 @@ void WriteOneLineToSyslog(const char *s) {
+ }
+ 
+ void LogFullErrorReport(const char *buffer) {
++#if SANITIZER_OS_TRACE
+   // Log with os_trace. This will make it into the crash log.
+   if (GetMacosVersion() >= MACOS_VERSION_MAVERICKS) {
+     // os_trace requires the message (format parameter) to be a string literal.
+@@ -399,6 +407,7 @@ void LogFullErrorReport(const char *buffer) {
+     if (common_flags()->log_to_syslog)
+       os_trace("Consult syslog for more information.");
+   }
++#endif
+ 
+   // Log to syslog.
+   // The logging on OS X may call pthread_create so we need the threading
+-- 
+2.6.2
+

Deleted: trunk/dports/lang/llvm-3.8/files/2007-Save-the-ASan-report-in-the-OS-X-crash-log.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2007-Save-the-ASan-report-in-the-OS-X-crash-log.patch	2015-10-29 15:12:48 UTC (rev 141827)
+++ trunk/dports/lang/llvm-3.8/files/2007-Save-the-ASan-report-in-the-OS-X-crash-log.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -1,65 +0,0 @@
-From a08e5cb1b4ca37e33ae8efa8d39a7f90931e8d7f Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
-Date: Sun, 25 Oct 2015 16:03:00 -0700
-Subject: [PATCH 2007/2007] Save the ASan report in the OS X crash log
-
-Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
----
- lib/asan/asan_report.cc | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git llvm_master/projects/compiler-rt/lib/asan/asan_report.cc macports_master/projects/compiler-rt/lib/asan/asan_report.cc
-index 957ac14..0ee03b9 100644
---- llvm_master/projects/compiler-rt/lib/asan/asan_report.cc
-+++ macports_master/projects/compiler-rt/lib/asan/asan_report.cc
-@@ -24,6 +24,18 @@
- #include "sanitizer_common/sanitizer_stackdepot.h"
- #include "sanitizer_common/sanitizer_symbolizer.h"
- 
-+// Apple CrashReporter support.
-+#ifdef __APPLE__
-+extern "C" {
-+static char __crashreporter_info_buff__[1 << 16] = { 0 };
-+static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0];
-+asm (".desc ___crashreporter_info__, 0x10");
-+
-+#include <string.h>
-+#define CRSetCrashLogMessage(msg) strlcpy(__crashreporter_info_buff__, msg, sizeof(__crashreporter_info_buff__));
-+}
-+#endif
-+
- namespace __asan {
- 
- // -------------------- User-specified callbacks ----------------- {{{1
-@@ -46,6 +58,16 @@ static bool report_happened = false;
- static ReportData report_data = {};
- 
- void AppendToErrorMessageBuffer(const char *buffer) {
-+#if __APPLE__
-+  // For the Apple CrashReporter support: Always store reports into buffer.
-+  if (!error_message_buffer) {
-+    error_message_buffer_size = 1 << 16;
-+    error_message_buffer =
-+        (char*)MmapOrDie(error_message_buffer_size, __func__);
-+    error_message_buffer_pos = 0;
-+  }
-+#endif
-+
-   if (error_message_buffer) {
-     uptr length = internal_strlen(buffer);
-     CHECK_GE(error_message_buffer_size, error_message_buffer_pos);
-@@ -664,6 +686,11 @@ class ScopedInErrorReport {
-     // Print memory stats.
-     if (flags()->print_stats)
-       __asan_print_accumulated_stats();
-+
-+#ifdef __APPLE__
-+    CRSetCrashLogMessage(error_message_buffer);
-+#endif
-+
-     if (error_report_callback) {
-       error_report_callback(error_message_buffer);
-     }
--- 
-2.6.2
-

Added: trunk/dports/lang/llvm-3.8/files/2008-Save-the-ASan-report-in-the-OS-X-crash-log.patch
===================================================================
--- trunk/dports/lang/llvm-3.8/files/2008-Save-the-ASan-report-in-the-OS-X-crash-log.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.8/files/2008-Save-the-ASan-report-in-the-OS-X-crash-log.patch	2015-10-29 15:20:41 UTC (rev 141828)
@@ -0,0 +1,44 @@
+From 88dd2b10bcb87f6664a8e4784afe3876cd0c4cf4 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Thu, 29 Oct 2015 00:26:24 -0700
+Subject: [PATCH 2008/2008] Save the ASan report in the OS X crash log
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+---
+ lib/sanitizer_common/sanitizer_mac.cc | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git llvm_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc macports_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+index 49e0c7c..3f22d2f 100644
+--- llvm_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
++++ macports_master/projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+@@ -62,6 +62,12 @@ extern char **environ;
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
++extern "C" {
++static char __crashreporter_info_buff__[1 << 16] = { 0 };
++static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0];
++asm (".desc ___crashreporter_info__, 0x10");
++}
++
+ namespace __sanitizer {
+ 
+ #include "sanitizer_syscall_generic.inc"
+@@ -409,6 +415,13 @@ void LogFullErrorReport(const char *buffer) {
+   }
+ #endif
+ 
++  // Save to CrashReporter if we're aborting
++  if (common_flags()->abort_on_error) {
++    internal_strncpy(__crashreporter_info_buff__, buffer, sizeof(__crashreporter_info_buff__));
++    __crashreporter_info_buff__[sizeof(__crashreporter_info_buff__)-1] = '\0';
++    RemoveANSIEscapeSequencesFromString(__crashreporter_info_buff__);
++  }
++
+   // Log to syslog.
+   // The logging on OS X may call pthread_create so we need the threading
+   // environment to be fully initialized. Also, this should never be called when
+-- 
+2.6.2
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/26d780fd/attachment-0001.html>


More information about the macports-changes mailing list