From b7ed839a15b9057e68f9181a4fca0bc1046ef297 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 23 Sep 2019 00:37:15 +0200 Subject: [PATCH] libcxx: update to 9.0.0 + ppc long double patch --- srcpkgs/libcxx/patches/ppc.patch | 22 ++++++++++++++++++++++ srcpkgs/libcxx/template | 6 +++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/libcxx/patches/ppc.patch diff --git a/srcpkgs/libcxx/patches/ppc.patch b/srcpkgs/libcxx/patches/ppc.patch new file mode 100644 index 00000000000..adcb0c57b0d --- /dev/null +++ b/srcpkgs/libcxx/patches/ppc.patch @@ -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 diff --git a/srcpkgs/libcxx/template b/srcpkgs/libcxx/template index df7444a470f..58af53e149e 100644 --- a/srcpkgs/libcxx/template +++ b/srcpkgs/libcxx/template @@ -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 " 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"