From 4a92b2b1e039ad1a12474c5f8e70a9cbb5fa5a79 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Tue, 2 Oct 2018 15:01:09 +0200 Subject: [PATCH] libcxx: update to 7.0.1. [ci skip] --- srcpkgs/libcxx/template | 53 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/srcpkgs/libcxx/template b/srcpkgs/libcxx/template index 90ab202dc8d..7588f248c86 100644 --- a/srcpkgs/libcxx/template +++ b/srcpkgs/libcxx/template @@ -1,34 +1,41 @@ # Template file for 'libcxx' pkgname=libcxx -version=6.0.1 +version=7.0.1 revision=1 wrksrc="${pkgname}-${version}.src" build_style=cmake -hostmakedepends="clang llvm python" +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="llvm7 python" makedepends="libcxxabi-devel llvm llvm-libunwind-devel" make_build_args="VERBOSE=1" short_desc="New implementation of the C++ standard library, targeting C++11" maintainer="Juan RP " -homepage="http://libcxx.llvm.org" +homepage="https://libcxx.llvm.org" license="NCSA, MIT" -distfiles="http://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz" -checksum=7654fbc810a03860e6f01a54c2297a0b9efb04c0b9aa0409251d9bdb3726fc67 - -case "$XBPS_TARGET_MACHINE" in - arm*) _broken="libcxxabi doesn't build on arm." ;; - *) configure_args+=" - -DLIBCXX_CXX_ABI=libcxxabi - -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON - -DLIBCXX_CXX_ABI_LIBRARY_PATH=${XBPS_CROSS_BASE}/usr/lib - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ - " - LDFLAGS="-Wl,--no-as-needed -lunwind -Wl,--as-needed" -esac +distfiles="https://www.llvm.org/releases/${version}/${pkgname}-${version}.src.tar.xz" +checksum=020002618b319dc2a8ba1f2cba88b8cc6a209005ed8ad29f9de0c562c6ebb9f1 case "$XBPS_TARGET_MACHINE" in *-musl) configure_args+=" -DLIBCXX_HAS_MUSL_LIBC=YES" esac +# Doesn't build on AArch64 with GCC +case "$XBPS_TARGET_MACHINE" in + aarch64*) + hostmakedepends+=" clang" + pre_configure() { + export CC="clang" + export CXX="clang++" + + CFLAGS+=" --target=$XBPS_CROSS_TRIPLET --sysroot=${XBPS_CROSS_BASE}" + CXXFLAGS+=" --target=${XBPS_CROSS_TRIPLET} --sysroot=${XBPS_CROSS_BASE}" + } + ;; +esac + + post_extract() { case "$XBPS_TARGET_MACHINE" in *-musl) patch -Np1 <${FILESDIR}/libcxx-0001-musl-hacks.patch @@ -36,18 +43,10 @@ post_extract() { esac } -pre_configure() { - export CC="clang" - export CXX="clang++" - if [ "$CROSS_BUILD" ]; then - for _gccdir in /usr/lib/gcc/$XBPS_CROSS_TRIPLET/*.*.*; do - CFLAGS+=" --target=$XBPS_CROSS_TRIPLET --sysroot=/usr/$XBPS_CROSS_TRIPLET -B$_gccdir" - CXXFLAGS+=" --target=$XBPS_CROSS_TRIPLET --sysroot=/usr/$XBPS_CROSS_TRIPLET -B$_gccdir" - LDFLAGS+=" -L$_gccdir" - done - fi - +post_install() { + vlicense LICENSE.TXT } + libcxx-devel_package() { short_desc+=" - development files" depends="${sourcepkg}>=${version}_${revision}"