[142763] trunk/dports/lang/libcxxabi
jeremyhu at macports.org
jeremyhu at macports.org
Sat Dec 12 07:07:58 PST 2015
Revision: 142763
https://trac.macports.org/changeset/142763
Author: jeremyhu at macports.org
Date: 2015-11-22 13:15:43 -0800 (Sun, 22 Nov 2015)
Log Message:
-----------
libcxxabi: Update to 3.7.0 release
Modified Paths:
--------------
trunk/dports/lang/libcxxabi/Portfile
Added Paths:
-----------
trunk/dports/lang/libcxxabi/files/0001-Update-buildit-script-to-read-EXTRA_LDFLAGS-from-the.patch
trunk/dports/lang/libcxxabi/files/0002-Revert-Make-libc-abi-use-the-implementation-of-__num.patch
Removed Paths:
-------------
trunk/dports/lang/libcxxabi/files/0001-Revert-Make-libc-abi-use-the-implementation-of-__num.patch
trunk/dports/lang/libcxxabi/files/PR-23238.patch
trunk/dports/lang/libcxxabi/files/leopard.patch
Modified: trunk/dports/lang/libcxxabi/Portfile
===================================================================
--- trunk/dports/lang/libcxxabi/Portfile 2015-11-22 20:59:53 UTC (rev 142762)
+++ trunk/dports/lang/libcxxabi/Portfile 2015-11-22 21:15:43 UTC (rev 142763)
@@ -4,8 +4,7 @@
PortGroup compiler_blacklist_versions 1.0
name libcxxabi
-version 3.6.0
-revision 1
+version 3.7.0
epoch 1
categories lang
platforms darwin
@@ -27,16 +26,16 @@
use_xz yes
distname ${name}-${version}.src
-checksums rmd160 bdbc09554b5427fedcc66f72058da3d3618a7692 \
- sha256 f78bcfdb8015272f28d70f5546a544b5bdae5d92862711e8ecb9b24387d994f5
+checksums rmd160 d06ebae3fc873f47588c544e5e516b695c8c0809 \
+ sha256 48b074fd334958b2d8bab893c897a0c8258328782cdec2d229c7bce432b49beb
set roots_path ${prefix}/var/system_roots/
set root_name ${name}-${version}-${revision}
patch.pre_args -p1
patchfiles \
- 0001-Revert-Make-libc-abi-use-the-implementation-of-__num.patch \
- PR-23238.patch
+ 0001-Update-buildit-script-to-read-EXTRA_LDFLAGS-from-the.patch \
+ 0002-Revert-Make-libc-abi-use-the-implementation-of-__num.patch
variant universal {}
use_configure no
Deleted: trunk/dports/lang/libcxxabi/files/0001-Revert-Make-libc-abi-use-the-implementation-of-__num.patch
===================================================================
--- trunk/dports/lang/libcxxabi/files/0001-Revert-Make-libc-abi-use-the-implementation-of-__num.patch 2015-11-22 20:59:53 UTC (rev 142762)
+++ trunk/dports/lang/libcxxabi/files/0001-Revert-Make-libc-abi-use-the-implementation-of-__num.patch 2015-11-22 21:15:43 UTC (rev 142763)
@@ -1,179 +0,0 @@
-From d912ab33ad802340ad7aa5e7e39b9d1bea5fe89a Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
-Date: Mon, 29 Dec 2014 22:05:22 -0800
-Subject: [PATCH] Revert "Make libc++abi use the implementation of __numstr
- from libc++. No functionality change, just removal of duplicated code."
-
-This reverts commit f7a83f7f3b5788e3ead1c7f2063994699df55085.
----
- src/stdexcept.cpp | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 127 insertions(+), 6 deletions(-)
-
-diff --git a/src/stdexcept.cpp b/src/stdexcept.cpp
-index bd6789e..246eea4 100644
---- a/src/stdexcept.cpp
-+++ b/src/stdexcept.cpp
-@@ -7,7 +7,6 @@
- //
- //===----------------------------------------------------------------------===//
-
--#include "__refstring"
- #include "stdexcept"
- #include "new"
- #include <cstdlib>
-@@ -15,25 +14,147 @@
- #include <cstdint>
- #include <cstddef>
-
--static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
-+#if __APPLE__
-+#include <dlfcn.h>
-+#include <mach-o/dyld.h>
-+#endif
-+
-+// Note: optimize for size
-+
-+#pragma GCC visibility push(hidden)
-+
-+namespace
-+{
-+
-+class __libcpp_nmstr
-+{
-+private:
-+ const char* str_;
-+
-+ typedef int count_t;
-+
-+ struct _Rep_base
-+ {
-+ std::size_t len;
-+ std::size_t cap;
-+ count_t count;
-+ };
-+
-+ static const std::ptrdiff_t offset = static_cast<std::ptrdiff_t>(sizeof(_Rep_base));
-+
-+ count_t& count() const _NOEXCEPT {return ((_Rep_base*)(str_ - offset))->count;}
-+
-+#if __APPLE__
-+ static
-+ const void*
-+ compute_gcc_empty_string_storage() _NOEXCEPT
-+ {
-+ void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
-+ if (handle == 0)
-+ return 0;
-+ return (const char*)dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE") + offset;
-+ }
-+
-+ static
-+ const void*
-+ get_gcc_empty_string_storage() _NOEXCEPT
-+ {
-+ static const void* p = compute_gcc_empty_string_storage();
-+ return p;
-+ }
-+#endif
-+
-+public:
-+ explicit __libcpp_nmstr(const char* msg);
-+ __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT;
-+ __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT;
-+ ~__libcpp_nmstr();
-+ const char* c_str() const _NOEXCEPT {return str_;}
-+};
-+
-+__libcpp_nmstr::__libcpp_nmstr(const char* msg)
-+{
-+ std::size_t len = strlen(msg);
-+ str_ = static_cast<const char*>(::operator new(len + 1 + offset));
-+ _Rep_base* c = (_Rep_base*)str_;
-+ c->len = c->cap = len;
-+ str_ += offset;
-+ count() = 0;
-+ std::memcpy(const_cast<char*>(c_str()), msg, len + 1);
-+}
-+
-+inline
-+__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT
-+ : str_(s.str_)
-+{
-+#if __APPLE__
-+ if (str_ != get_gcc_empty_string_storage())
-+#endif
-+ __sync_add_and_fetch(&count(), 1);
-+}
-+
-+__libcpp_nmstr&
-+__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT
-+{
-+ const char* p = str_;
-+ str_ = s.str_;
-+#if __APPLE__
-+ if (str_ != get_gcc_empty_string_storage())
-+#endif
-+ __sync_add_and_fetch(&count(), 1);
-+#if __APPLE__
-+ if (p != get_gcc_empty_string_storage())
-+#endif
-+ if (__sync_add_and_fetch((count_t*)(p-sizeof(count_t)), count_t(-1)) < 0)
-+ {
-+ ::operator delete(const_cast<char*>(p-offset));
-+ }
-+ return *this;
-+}
-+
-+inline
-+__libcpp_nmstr::~__libcpp_nmstr()
-+{
-+#if __APPLE__
-+ if (str_ != get_gcc_empty_string_storage())
-+#endif
-+ if (__sync_add_and_fetch(&count(), count_t(-1)) < 0)
-+ {
-+ ::operator delete(const_cast<char*>(str_ - offset));
-+ }
-+}
-+
-+}
-+
-+#pragma GCC visibility pop
-
- namespace std // purposefully not using versioning namespace
- {
-
--logic_error::~logic_error() _NOEXCEPT {}
-+logic_error::~logic_error() _NOEXCEPT
-+{
-+ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-+ s.~__libcpp_nmstr();
-+}
-
- const char*
- logic_error::what() const _NOEXCEPT
- {
-- return __imp_.c_str();
-+ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-+ return s.c_str();
- }
-
--runtime_error::~runtime_error() _NOEXCEPT {}
-+runtime_error::~runtime_error() _NOEXCEPT
-+{
-+ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-+ s.~__libcpp_nmstr();
-+}
-
- const char*
- runtime_error::what() const _NOEXCEPT
- {
-- return __imp_.c_str();
-+ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
-+ return s.c_str();
- }
-
- domain_error::~domain_error() _NOEXCEPT {}
---
-2.2.1
-
Added: trunk/dports/lang/libcxxabi/files/0001-Update-buildit-script-to-read-EXTRA_LDFLAGS-from-the.patch
===================================================================
--- trunk/dports/lang/libcxxabi/files/0001-Update-buildit-script-to-read-EXTRA_LDFLAGS-from-the.patch (rev 0)
+++ trunk/dports/lang/libcxxabi/files/0001-Update-buildit-script-to-read-EXTRA_LDFLAGS-from-the.patch 2015-11-22 21:15:43 UTC (rev 142763)
@@ -0,0 +1,27 @@
+From d499463febbff8eba10949c7810221d491bdddff Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sun, 11 Jan 2015 14:31:06 -0800
+Subject: [PATCH 1/2] Update buildit script to read EXTRA_LDFLAGS from the
+ environment
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+---
+ lib/buildit | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/buildit b/lib/buildit
+index 5a4a710..610e92b 100755
+--- a/lib/buildit
++++ b/lib/buildit
+@@ -91,7 +91,7 @@ case $TRIPLE in
+ done
+ ;;
+ esac
+-$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
++$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS $EXTRA_LDFLAGS
+
+ if [ -z $RC_XBS ]
+ then
+--
+2.6.2
+
Added: trunk/dports/lang/libcxxabi/files/0002-Revert-Make-libc-abi-use-the-implementation-of-__num.patch
===================================================================
--- trunk/dports/lang/libcxxabi/files/0002-Revert-Make-libc-abi-use-the-implementation-of-__num.patch (rev 0)
+++ trunk/dports/lang/libcxxabi/files/0002-Revert-Make-libc-abi-use-the-implementation-of-__num.patch 2015-11-22 21:15:43 UTC (rev 142763)
@@ -0,0 +1,179 @@
+From c3520f9c833c6ae5d00530a54028ff4a5befc463 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Mon, 29 Dec 2014 22:05:22 -0800
+Subject: [PATCH 2/2] Revert "Make libc++abi use the implementation of __numstr
+ from libc++. No functionality change, just removal of duplicated code."
+
+This reverts commit f7a83f7f3b5788e3ead1c7f2063994699df55085.
+---
+ src/stdexcept.cpp | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 127 insertions(+), 6 deletions(-)
+
+diff --git a/src/stdexcept.cpp b/src/stdexcept.cpp
+index bd6789e..246eea4 100644
+--- a/src/stdexcept.cpp
++++ b/src/stdexcept.cpp
+@@ -7,7 +7,6 @@
+ //
+ //===----------------------------------------------------------------------===//
+
+-#include "__refstring"
+ #include "stdexcept"
+ #include "new"
+ #include <cstdlib>
+@@ -15,25 +14,147 @@
+ #include <cstdint>
+ #include <cstddef>
+
+-static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
++#if __APPLE__
++#include <dlfcn.h>
++#include <mach-o/dyld.h>
++#endif
++
++// Note: optimize for size
++
++#pragma GCC visibility push(hidden)
++
++namespace
++{
++
++class __libcpp_nmstr
++{
++private:
++ const char* str_;
++
++ typedef int count_t;
++
++ struct _Rep_base
++ {
++ std::size_t len;
++ std::size_t cap;
++ count_t count;
++ };
++
++ static const std::ptrdiff_t offset = static_cast<std::ptrdiff_t>(sizeof(_Rep_base));
++
++ count_t& count() const _NOEXCEPT {return ((_Rep_base*)(str_ - offset))->count;}
++
++#if __APPLE__
++ static
++ const void*
++ compute_gcc_empty_string_storage() _NOEXCEPT
++ {
++ void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD);
++ if (handle == 0)
++ return 0;
++ return (const char*)dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE") + offset;
++ }
++
++ static
++ const void*
++ get_gcc_empty_string_storage() _NOEXCEPT
++ {
++ static const void* p = compute_gcc_empty_string_storage();
++ return p;
++ }
++#endif
++
++public:
++ explicit __libcpp_nmstr(const char* msg);
++ __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT;
++ __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT;
++ ~__libcpp_nmstr();
++ const char* c_str() const _NOEXCEPT {return str_;}
++};
++
++__libcpp_nmstr::__libcpp_nmstr(const char* msg)
++{
++ std::size_t len = strlen(msg);
++ str_ = static_cast<const char*>(::operator new(len + 1 + offset));
++ _Rep_base* c = (_Rep_base*)str_;
++ c->len = c->cap = len;
++ str_ += offset;
++ count() = 0;
++ std::memcpy(const_cast<char*>(c_str()), msg, len + 1);
++}
++
++inline
++__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT
++ : str_(s.str_)
++{
++#if __APPLE__
++ if (str_ != get_gcc_empty_string_storage())
++#endif
++ __sync_add_and_fetch(&count(), 1);
++}
++
++__libcpp_nmstr&
++__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT
++{
++ const char* p = str_;
++ str_ = s.str_;
++#if __APPLE__
++ if (str_ != get_gcc_empty_string_storage())
++#endif
++ __sync_add_and_fetch(&count(), 1);
++#if __APPLE__
++ if (p != get_gcc_empty_string_storage())
++#endif
++ if (__sync_add_and_fetch((count_t*)(p-sizeof(count_t)), count_t(-1)) < 0)
++ {
++ ::operator delete(const_cast<char*>(p-offset));
++ }
++ return *this;
++}
++
++inline
++__libcpp_nmstr::~__libcpp_nmstr()
++{
++#if __APPLE__
++ if (str_ != get_gcc_empty_string_storage())
++#endif
++ if (__sync_add_and_fetch(&count(), count_t(-1)) < 0)
++ {
++ ::operator delete(const_cast<char*>(str_ - offset));
++ }
++}
++
++}
++
++#pragma GCC visibility pop
+
+ namespace std // purposefully not using versioning namespace
+ {
+
+-logic_error::~logic_error() _NOEXCEPT {}
++logic_error::~logic_error() _NOEXCEPT
++{
++ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
++ s.~__libcpp_nmstr();
++}
+
+ const char*
+ logic_error::what() const _NOEXCEPT
+ {
+- return __imp_.c_str();
++ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
++ return s.c_str();
+ }
+
+-runtime_error::~runtime_error() _NOEXCEPT {}
++runtime_error::~runtime_error() _NOEXCEPT
++{
++ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
++ s.~__libcpp_nmstr();
++}
+
+ const char*
+ runtime_error::what() const _NOEXCEPT
+ {
+- return __imp_.c_str();
++ __libcpp_nmstr& s = (__libcpp_nmstr&)__imp_;
++ return s.c_str();
+ }
+
+ domain_error::~domain_error() _NOEXCEPT {}
+--
+2.6.2
+
Deleted: trunk/dports/lang/libcxxabi/files/PR-23238.patch
===================================================================
--- trunk/dports/lang/libcxxabi/files/PR-23238.patch 2015-11-22 20:59:53 UTC (rev 142762)
+++ trunk/dports/lang/libcxxabi/files/PR-23238.patch 2015-11-22 21:15:43 UTC (rev 142763)
@@ -1,13 +0,0 @@
-https://llvm.org/bugs/show_bug.cgi?id=23238
-
---- a/src/cxa_handlers.cpp 2014-10-03 13:03:47.000000000 -0700
-+++ b/src/cxa_handlers.cpp 2015-04-15 05:26:25.000000000 -0700
-@@ -102,7 +102,7 @@ terminate() _NOEXCEPT
- __terminate(get_terminate());
- }
-
--new_handler __cxa_new_handler = 0;
-+extern "C" new_handler __cxa_new_handler = 0;
- // In the future these will become:
- // std::atomic<std::new_handler> __cxa_new_handler(0);
-
Deleted: trunk/dports/lang/libcxxabi/files/leopard.patch
===================================================================
--- trunk/dports/lang/libcxxabi/files/leopard.patch 2015-11-22 20:59:53 UTC (rev 142762)
+++ trunk/dports/lang/libcxxabi/files/leopard.patch 2015-11-22 21:15:43 UTC (rev 142763)
@@ -1,11 +0,0 @@
---- a/lib/buildit 2015-01-04 01:26:12.000000000 -0800
-+++ b/lib/buildit 2015-01-04 01:27:59.000000000 -0800
-@@ -91,7 +95,7 @@ case $TRIPLE in
- done
- ;;
- esac
--$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
-+$CC *.o $RC_CFLAGS $EXTRA_LDFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
-
- if [ -z $RC_XBS ]
- then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/054ae229/attachment-0001.html>
More information about the macports-changes
mailing list