From 7982539d292269b6472d34bd35f9cb273ac4a5ba Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 14 Mar 2016 22:35:46 +0100 Subject: [PATCH] libcxx: use libcxxabi. Fixes #901. --- .../libcxx/files/libcxx-0001-musl-hacks.patch | 39 +------------------ srcpkgs/libcxx/template | 12 ++++-- 2 files changed, 10 insertions(+), 41 deletions(-) diff --git a/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch b/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch index d94cfb0f61..137eb938d8 100644 --- a/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch +++ b/srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch @@ -1,35 +1,3 @@ -From b9c1e25e5e60ffd6417a498824349815694a6c45 Mon Sep 17 00:00:00 2001 -From: Travis Tilley -Date: Sat, 9 May 2015 04:21:27 -0400 -Subject: [PATCH] musl fixes/hacks - ---- - include/__config | 4 ---- - include/locale | 7 +++---- - src/locale.cpp | 16 ++-------------- - 3 files changed, 5 insertions(+), 22 deletions(-) - -diff --git a/include/__config b/include/__config -index 97c66c8..a65e991 100644 ---- a/include/__config -+++ b/include/__config -@@ -348,14 +348,10 @@ typedef __char32_t char32_t; - #define _LIBCPP_HAS_QUICK_EXIT - #elif defined(__linux__) - #include --#if __GLIBC_PREREQ(2, 15) - #define _LIBCPP_HAS_QUICK_EXIT --#endif --#if __GLIBC_PREREQ(2, 17) - #define _LIBCPP_HAS_C11_FEATURES - #endif - #endif --#endif - - #if (__has_feature(cxx_noexcept)) - # define _NOEXCEPT noexcept -diff --git a/include/locale b/include/locale -index ca468d5..f3016bb 100644 --- a/include/locale +++ b/include/locale @@ -10,7 +10,6 @@ @@ -67,15 +35,13 @@ index ca468d5..f3016bb 100644 typename remove_reference::type __current_errno = errno; if (__current_errno == 0) errno = __save_errno; -diff --git a/src/locale.cpp b/src/locale.cpp -index 2842bfc..4301b5f 100644 --- a/src/locale.cpp +++ b/src/locale.cpp @@ -1010,7 +1010,7 @@ ctype::do_narrow(const char_type* low, const char_type* high, char dfault, return low; } --#ifdef __EMSCRIPTEN__ +-#if defined(__EMSCRIPTEN__) +#ifdef __linux__ extern "C" const unsigned short ** __ctype_b_loc(); extern "C" const int ** __ctype_tolower_loc(); @@ -102,6 +68,3 @@ index 2842bfc..4301b5f 100644 #endif } #endif --- -2.1.4 - diff --git a/srcpkgs/libcxx/template b/srcpkgs/libcxx/template index 5ffbfa79a2..6c2e4c846f 100644 --- a/srcpkgs/libcxx/template +++ b/srcpkgs/libcxx/template @@ -1,10 +1,14 @@ # Template file for 'libcxx' pkgname=libcxx version=3.8.0 -revision=1 +revision=2 build_style=cmake hostmakedepends="cmake" -makedepends="llvm-libunwind-devel" +configure_args="-DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON" +case "$XBPS_TARGET_MACHINE" in + *-musl) configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES" +esac +makedepends="llvm-libunwind-devel libcxxabi-devel" LDFLAGS="-Wl,--no-as-needed -lunwind -Wl,--as-needed" make_build_args="VERBOSE=1" short_desc="New implementation of the C++ standard library, targeting C++11" @@ -17,7 +21,9 @@ wrksrc=${pkgname}-${version}.src post_extract() { case "$XBPS_TARGET_MACHINE" in - *-musl) patch -Np1 <${FILESDIR}/libcxx-0001-musl-hacks.patch + *-musl) + patch -Np1 <${FILESDIR}/libcxx-0001-musl-hacks.patch + sed -i 's/!defined(_GCC_MAX_ALIGN_T)/& \&\& !defined(__DEFINED_max_align_t)/' include/stddef.h esac }