libcxx: use libcxxabi.

Fixes #901.
This commit is contained in:
Christian Neukirchen 2016-03-14 22:35:46 +01:00
parent 869f48fb36
commit 7982539d29
2 changed files with 10 additions and 41 deletions

View file

@ -1,35 +1,3 @@
From b9c1e25e5e60ffd6417a498824349815694a6c45 Mon Sep 17 00:00:00 2001
From: Travis Tilley <ttilley@gmail.com>
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 <features.h>
-#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<decltype(errno)>::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<char>::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

View file

@ -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
}