libcxx: update to 4.0.0.
Now supports static and dynamic lib out of the box.
This commit is contained in:
parent
0e51b944c9
commit
ae5162801e
2 changed files with 17 additions and 35 deletions
|
@ -26,21 +26,21 @@
|
||||||
typename remove_reference<decltype(errno)>::type __current_errno = errno;
|
typename remove_reference<decltype(errno)>::type __current_errno = errno;
|
||||||
if (__current_errno == 0)
|
if (__current_errno == 0)
|
||||||
errno = __save_errno;
|
errno = __save_errno;
|
||||||
--- a/src/locale.cpp
|
--- libcxx-4.0.0.src/src/locale.cpp.orig
|
||||||
+++ b/src/locale.cpp
|
+++ libcxx-4.0.0.src/src/locale.cpp
|
||||||
@@ -1010,7 +1010,7 @@ ctype<char>::do_narrow(const char_type* low, const char_type* high, char dfault,
|
@@ -1012,7 +1012,7 @@
|
||||||
return low;
|
return low;
|
||||||
}
|
}
|
||||||
|
|
||||||
-#if defined(__EMSCRIPTEN__)
|
-#if defined(__EMSCRIPTEN__)
|
||||||
+#ifdef __linux__
|
+#if defined(__linux__)
|
||||||
extern "C" const unsigned short ** __ctype_b_loc();
|
extern "C" const unsigned short ** __ctype_b_loc();
|
||||||
extern "C" const int ** __ctype_tolower_loc();
|
extern "C" const int ** __ctype_tolower_loc();
|
||||||
extern "C" const int ** __ctype_toupper_loc();
|
extern "C" const int ** __ctype_toupper_loc();
|
||||||
@@ -1112,20 +1112,8 @@ ctype<char>::classic_table() _NOEXCEPT
|
@@ -1118,20 +1118,8 @@
|
||||||
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
|
#else
|
||||||
// This is assumed to be safe, which is a nonsense assumption because we're
|
return __pctype_func();
|
||||||
// going to end up dereferencing it later...
|
#endif
|
||||||
-#elif defined(__EMSCRIPTEN__)
|
-#elif defined(__EMSCRIPTEN__)
|
||||||
- return *__ctype_b_loc();
|
- return *__ctype_b_loc();
|
||||||
-#elif defined(_NEWLIB_VERSION)
|
-#elif defined(_NEWLIB_VERSION)
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
# Template file for 'libcxx'
|
# Template file for 'libcxx'
|
||||||
pkgname=libcxx
|
pkgname=libcxx
|
||||||
version=3.9.1
|
version=4.0.0
|
||||||
revision=1
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
|
hostmakedepends="python"
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arm*)
|
arm*)
|
||||||
# libcxxabi doesn't build on arm.
|
# libcxxabi doesn't build on arm.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
configure_args+=" -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON"
|
configure_args+="
|
||||||
makedepends="llvm-libunwind-devel libcxxabi-devel"
|
-DLIBCXX_CXX_ABI=libcxxabi
|
||||||
|
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
|
||||||
|
-DLIBCXX_CXX_ABI_LIBRARY_PATH=/usr/lib
|
||||||
|
"
|
||||||
|
makedepends="llvm llvm-libunwind-devel libcxxabi-devel"
|
||||||
LDFLAGS="-Wl,--no-as-needed -lunwind -Wl,--as-needed"
|
LDFLAGS="-Wl,--no-as-needed -lunwind -Wl,--as-needed"
|
||||||
esac
|
esac
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
@ -21,7 +26,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
homepage="http://libcxx.llvm.org"
|
homepage="http://libcxx.llvm.org"
|
||||||
license="BSD"
|
license="BSD"
|
||||||
distfiles="http://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz"
|
distfiles="http://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz"
|
||||||
checksum=25e615e428f60e651ed09ffd79e563864e3f4bc69a9e93ee41505c419d1a7461
|
checksum=4f4d33c4ad69bf9e360eebe6b29b7b19486948b1a41decf89d4adec12473cf96
|
||||||
wrksrc=${pkgname}-${version}.src
|
wrksrc=${pkgname}-${version}.src
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
|
@ -31,29 +36,6 @@ post_extract() {
|
||||||
sed -i 's/!defined(_GCC_MAX_ALIGN_T)/& \&\& !defined(__DEFINED_max_align_t)/' include/stddef.h
|
sed -i 's/!defined(_GCC_MAX_ALIGN_T)/& \&\& !defined(__DEFINED_max_align_t)/' include/stddef.h
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
post_configure() {
|
|
||||||
(
|
|
||||||
mkdir -p ${wrksrc}/build-static
|
|
||||||
cd ${wrksrc}/build-static
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
|
||||||
cp ${wrksrc}/build/cross_${XBPS_CROSS_TRIPLET}.cmake .
|
|
||||||
fi
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
|
|
||||||
${configure_args} -DLIBCXX_ENABLE_SHARED=OFF ..
|
|
||||||
)
|
|
||||||
}
|
|
||||||
post_build() {
|
|
||||||
(
|
|
||||||
cd ${wrksrc}/build-static
|
|
||||||
${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
post_install() {
|
|
||||||
(
|
|
||||||
cd ${wrksrc}/build-static
|
|
||||||
${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
libcxx-devel_package() {
|
libcxx-devel_package() {
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
depends="${sourcepkg}>=${version}_${revision}"
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue