[144732] trunk/dports/lang/llvm-3.7

jeremyhu at macports.org jeremyhu at macports.org
Sat Jan 16 12:26:53 PST 2016


Revision: 144732
          https://trac.macports.org/changeset/144732
Author:   jeremyhu at macports.org
Date:     2016-01-16 12:26:53 -0800 (Sat, 16 Jan 2016)
Log Message:
-----------
llvm-3.7: Remove raise(), abort(), and __assert_rtn() overrides

Modified Paths:
--------------
    trunk/dports/lang/llvm-3.7/Portfile

Added Paths:
-----------
    trunk/dports/lang/llvm-3.7/files/0007-Remove-override-of-raise-abort-and-__assert_rtn.patch

Modified: trunk/dports/lang/llvm-3.7/Portfile
===================================================================
--- trunk/dports/lang/llvm-3.7/Portfile	2016-01-16 20:21:39 UTC (rev 144731)
+++ trunk/dports/lang/llvm-3.7/Portfile	2016-01-16 20:26:53 UTC (rev 144732)
@@ -8,6 +8,7 @@
 set llvm_version        3.7
 set llvm_version_no_dot 37
 name                    llvm-${llvm_version}
+revision                1
 subport                 clang-${llvm_version} { revision 2 }
 set suffix              mp-${llvm_version}
 set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
@@ -120,6 +121,7 @@
         0004-MacPorts-Only-Use-full-path-for-the-dylib-id-instead.patch \
         0005-MacPorts-Only-Don-t-embed-the-deployment-target-in-t.patch \
         0006-MacPorts-Only-Skip-checking-for-python-in-configure.patch \
+        0007-Remove-override-of-raise-abort-and-__assert_rtn.patch \
         llvm-skip-unittests.patch
 
 if {${subport} eq "clang-${llvm_version}"} {

Added: trunk/dports/lang/llvm-3.7/files/0007-Remove-override-of-raise-abort-and-__assert_rtn.patch
===================================================================
--- trunk/dports/lang/llvm-3.7/files/0007-Remove-override-of-raise-abort-and-__assert_rtn.patch	                        (rev 0)
+++ trunk/dports/lang/llvm-3.7/files/0007-Remove-override-of-raise-abort-and-__assert_rtn.patch	2016-01-16 20:26:53 UTC (rev 144732)
@@ -0,0 +1,62 @@
+From 51958b26c17d9d51ca5f7bb1ee52af34ef5f444b Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sat, 16 Jan 2016 10:19:07 -0800
+Subject: [PATCH 7/7] Remove override of raise(), abort(), and __assert_rtn()
+
+Lion (10.7) and newer versions of OS X implement abort() using pthread_kill().
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+---
+ lib/Support/Unix/Signals.inc | 39 ---------------------------------------
+ 1 file changed, 39 deletions(-)
+
+diff --git llvm_release_38/lib/Support/Unix/Signals.inc macports_release_38/lib/Support/Unix/Signals.inc
+index 4d687b3..f2797a0 100644
+--- llvm_release_38/lib/Support/Unix/Signals.inc
++++ macports_release_38/lib/Support/Unix/Signals.inc
+@@ -411,42 +411,3 @@ void llvm::sys::PrintStackTraceOnErrorSignal(bool DisableCrashReporting) {
+   }
+ #endif
+ }
+-
+-
+-/***/
+-
+-// On Darwin, raise sends a signal to the main thread instead of the current
+-// thread. This has the unfortunate effect that assert() and abort() will end up
+-// bypassing our crash recovery attempts. We work around this for anything in
+-// the same linkage unit by just defining our own versions of the assert handler
+-// and abort.
+-
+-#if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES)
+-
+-#include <signal.h>
+-#include <pthread.h>
+-
+-int raise(int sig) {
+-  return pthread_kill(pthread_self(), sig);
+-}
+-
+-void __assert_rtn(const char *func,
+-                  const char *file,
+-                  int line,
+-                  const char *expr) {
+-  if (func)
+-    fprintf(stderr, "Assertion failed: (%s), function %s, file %s, line %d.\n",
+-            expr, func, file, line);
+-  else
+-    fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n",
+-            expr, file, line);
+-  abort();
+-}
+-
+-void abort() {
+-  raise(SIGABRT);
+-  usleep(1000);
+-  __builtin_trap();
+-}
+-
+-#endif
+-- 
+2.7.0
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160116/f4db9a7c/attachment-0001.html>


More information about the macports-changes mailing list