libcxx: update to 9.0.0 + ppc long double patch

This commit is contained in:
q66 2019-09-23 00:37:15 +02:00 committed by Helmut Pozimski
parent 7e3076b481
commit b7ed839a15
2 changed files with 25 additions and 3 deletions

View file

@ -0,0 +1,22 @@
This ensures `is_iec559` is defined correctly under all long double ABIs,
including musl and its 64-bit long double. Also, `__ppc__` or `__ppc64__`
is not defined on gcc.
--- include/limits
+++ include/limits
@@ -426,8 +426,14 @@ protected:
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
-#if (defined(__ppc__) || defined(__ppc64__))
+#if defined(__powerpc__) || defined(__powerpc64__)
+#if (__LDBL_MAX_EXP__ > __DBL_MAX_EXP__) || (__LDBL_MANT_DIG__ == __DBL_MANT_DIG__)
+ /* IEEE 754 quadruple or double precision */
+ static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
+#else
+ /* 128-bit IBM double-double */
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
+#endif
#else
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
#endif

View file

@ -1,13 +1,13 @@
# Template file for 'libcxx'
pkgname=libcxx
version=8.0.0
version=9.0.0
revision=1
wrksrc="${pkgname}-${version}.src"
build_style=cmake
configure_args+=" -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON
-DLIBCXX_CXX_ABI_LIBRARY_PATH=${XBPS_CROSS_BASE}/usr/lib
-DLIBCXXABI_USE_LLVM_UNWINDER=1"
hostmakedepends="llvm8 python"
hostmakedepends="llvm9 python3"
makedepends="libcxxabi-devel llvm llvm-libunwind-devel"
make_build_args="VERBOSE=1"
short_desc="New implementation of the C++ standard library, targeting C++11, C++14 and above"
@ -15,7 +15,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="NCSA, MIT"
homepage="https://libcxx.llvm.org"
distfiles="https://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz"
checksum=c2902675e7c84324fb2c1e45489220f250ede016cc3117186785d9dc291f9de2
checksum=3c4162972b5d3204ba47ac384aa456855a17b5e97422723d4758251acf1ed28c
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES"