libcxx: update to 3.8.0.
This commit is contained in:
parent
f658b97740
commit
65a1cc42d0
107
srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch
Normal file
107
srcpkgs/libcxx/files/libcxx-0001-musl-hacks.patch
Normal file
@ -0,0 +1,107 @@
|
||||
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 @@
|
||||
|
||||
#ifndef _LIBCPP_LOCALE
|
||||
#define _LIBCPP_LOCALE
|
||||
-
|
||||
/*
|
||||
locale synopsis
|
||||
|
||||
@@ -871,7 +870,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
|
||||
typename remove_reference<decltype(errno)>::type __save_errno = errno;
|
||||
errno = 0;
|
||||
char *__p2;
|
||||
- long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
|
||||
+ long long __ll = strtoll(__a, &__p2, __base);
|
||||
typename remove_reference<decltype(errno)>::type __current_errno = errno;
|
||||
if (__current_errno == 0)
|
||||
errno = __save_errno;
|
||||
@@ -911,7 +910,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
|
||||
typename remove_reference<decltype(errno)>::type __save_errno = errno;
|
||||
errno = 0;
|
||||
char *__p2;
|
||||
- unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
|
||||
+ unsigned long long __ll = strtoull(__a, &__p2, __base);
|
||||
typename remove_reference<decltype(errno)>::type __current_errno = errno;
|
||||
if (__current_errno == 0)
|
||||
errno = __save_errno;
|
||||
@@ -941,7 +940,7 @@ __num_get_float(const char* __a, const char* __a_end, ios_base::iostate& __err)
|
||||
typename remove_reference<decltype(errno)>::type __save_errno = errno;
|
||||
errno = 0;
|
||||
char *__p2;
|
||||
- long double __ld = strtold_l(__a, &__p2, _LIBCPP_GET_C_LOCALE);
|
||||
+ long double __ld = strtold(__a, &__p2);
|
||||
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__
|
||||
+#ifdef __linux__
|
||||
extern "C" const unsigned short ** __ctype_b_loc();
|
||||
extern "C" const int ** __ctype_tolower_loc();
|
||||
extern "C" const int ** __ctype_toupper_loc();
|
||||
@@ -1112,20 +1112,8 @@ ctype<char>::classic_table() _NOEXCEPT
|
||||
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
|
||||
// This is assumed to be safe, which is a nonsense assumption because we're
|
||||
// going to end up dereferencing it later...
|
||||
-#elif defined(__EMSCRIPTEN__)
|
||||
- return *__ctype_b_loc();
|
||||
-#elif defined(_NEWLIB_VERSION)
|
||||
- // Newlib has a 257-entry table in ctype_.c, where (char)0 starts at [1].
|
||||
- return _ctype_ + 1;
|
||||
-#elif defined(_AIX)
|
||||
- return (const unsigned int *)__lc_ctype_ptr->obj->mask;
|
||||
#else
|
||||
- // Platform not supported: abort so the person doing the port knows what to
|
||||
- // fix
|
||||
-# warning ctype<char>::classic_table() is not implemented
|
||||
- printf("ctype<char>::classic_table() is not implemented\n");
|
||||
- abort();
|
||||
- return NULL;
|
||||
+ return (const unsigned long *)*__ctype_b_loc();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,17 +1,26 @@
|
||||
# Template file for 'libcxx'
|
||||
pkgname=libcxx
|
||||
version=3.6.2
|
||||
version=3.8.0
|
||||
revision=1
|
||||
build_style=cmake
|
||||
hostmakedepends="cmake"
|
||||
makedepends="llvm-libunwind-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"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://libcxx.llvm.org"
|
||||
license="BSD"
|
||||
distfiles="http://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz"
|
||||
checksum=52f3d452f48209c9df1792158fdbd7f3e98ed9bca8ebb51fcd524f67437c8b81
|
||||
checksum=36804511b940bc8a7cefc7cb391a6b28f5e3f53f6372965642020db91174237b
|
||||
wrksrc=${pkgname}-${version}.src
|
||||
|
||||
post_extract() {
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) patch -Np1 <${FILESDIR}/libcxx-0001-musl-hacks.patch
|
||||
esac
|
||||
}
|
||||
|
||||
libcxx-devel_package() {
|
||||
short_desc+=" - development files"
|
||||
depends="${sourcepkg}>=${version}_${revision}"
|
||||
|
Loading…
Reference in New Issue
Block a user