summaryrefslogtreecommitdiff
path: root/sys-libs/libcxx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-07-04 14:05:23 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-07-04 14:05:23 +0100
commit05b8b0e0af1d72e51a3ee61522941bf7605cd01c (patch)
tree43b0410e62aba677b4b256bc3ffe3fd333d28dbe /sys-libs/libcxx
parent90c88731bd036e5698b281fbc0a5f3aa4c9983ac (diff)
gentoo resync : 04.07.2020
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/Manifest4
-rw-r--r--sys-libs/libcxx/libcxx-10.0.0.ebuild2
-rw-r--r--sys-libs/libcxx/libcxx-10.0.1_rc2.ebuild197
3 files changed, 201 insertions, 2 deletions
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 3b690431b01b..733c1db53887 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -2,10 +2,12 @@ AUX libcxx-3.9-cmake-link-flags.patch 1014 BLAKE2B 8e86059e00a5ebcd7a15288828766
DIST libcxx-8.0.1.src.tar.xz 1739524 BLAKE2B 6e641cb6bda0de12c8408d3ab33f627389ac014aa65b3391c870aa96ffd347784e6b70b953bd1ee8eba56554e0f78a723ab77b9dba5f85e6219e2b95ca50c160 SHA512 75749d08b2b343c6f5f9aefb04be63e42f6d12efc51101d3647ed6f70c7a6d050afb3ab2f3636eae78cb523f5844de67b960a7a3145ed89ab0c7015deb14921e
DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
DIST llvmorg-10.0.1-rc1.tar.gz 120834583 BLAKE2B 64244ebcb6f2c171c9f606e5eb0adff2794f06c9312a0ca627fb79c107c0c898ac242cf4e92523c3265fa717322601d7e3f4d178515fac95d03ee92312082b06 SHA512 f877f66046969a4055b166ad50ef876a9c8ecaf03e2cdd7c8e1a3348eb5f5180f222fa457b1f090a6660282a0d9f7a1d39cf09a04abe0dde0a6e1e10ccf15597
+DIST llvmorg-10.0.1-rc2.tar.gz 120883192 BLAKE2B d48f4ccb33691cd4997576a6d20b298455687515164f7d8dfa11ec32e197b58132c6bd549c1214c3b36982ef85e1018d4101e7afecee8d2ab67ad15d68c681bf SHA512 8e363d379a73e38ef570fb03d8243a21f37a48ef579a0f08118af4dac48060c0dc24e2bd8175f04241fa424e49b6c85723d2d3552bbe30dd165fe5fb43493325
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
-EBUILD libcxx-10.0.0.ebuild 6084 BLAKE2B 6c85f35df2356419ff707a588ade9937d8b5fa3857a535f29ac77312ce565a6d02247c12a84f1d2458fea352cb9d3c3c59392bb8b7caaf7e3493180c5ad663b8 SHA512 5e7149e78a8a38de75c5e7776245d6440aedf34d3883dae05f20182952c8bf9b065ed2d72c4d9a8e6a745d87716072d4bc3e18352a3747516405dc3aa2245e00
+EBUILD libcxx-10.0.0.ebuild 6083 BLAKE2B 9b77da1fa6e8bea1f096596a6f8fc3f7df4bf930fcaf16d939f27c35c6cdbfc443621b62e21f5fb3224706610b161f18b39efa2dd0698016b9c27bdffb438c70 SHA512 8cbb92ced5d5c44fc6af89dbc6b5cd4da4aea5306700e02a9e29ca8ce58d46a6678f2f00fdb2263410422ee034dbb050731743d6093bf5fe4cba8c9ff2dfe3c6
EBUILD libcxx-10.0.1.9999.ebuild 5948 BLAKE2B c21e547b5380231c33457b609f1eb08af7270270c3f1309f17bf751f18b0e06ac0a18ba7a136f76dbaafa3c59e7be91c3829cd35b147da751dfebbc2b075ffc1 SHA512 e6c2c6b3d42cc3af2296d1847ea147ca07f550af1d0b9b7ce7e7a6b1fa034f9da391768bdc4e541da0e6e74912553ddfa1775a0128dc9b798185572919dbc8eb
EBUILD libcxx-10.0.1_rc1.ebuild 5948 BLAKE2B c21e547b5380231c33457b609f1eb08af7270270c3f1309f17bf751f18b0e06ac0a18ba7a136f76dbaafa3c59e7be91c3829cd35b147da751dfebbc2b075ffc1 SHA512 e6c2c6b3d42cc3af2296d1847ea147ca07f550af1d0b9b7ce7e7a6b1fa034f9da391768bdc4e541da0e6e74912553ddfa1775a0128dc9b798185572919dbc8eb
+EBUILD libcxx-10.0.1_rc2.ebuild 5948 BLAKE2B c21e547b5380231c33457b609f1eb08af7270270c3f1309f17bf751f18b0e06ac0a18ba7a136f76dbaafa3c59e7be91c3829cd35b147da751dfebbc2b075ffc1 SHA512 e6c2c6b3d42cc3af2296d1847ea147ca07f550af1d0b9b7ce7e7a6b1fa034f9da391768bdc4e541da0e6e74912553ddfa1775a0128dc9b798185572919dbc8eb
EBUILD libcxx-11.0.0.9999.ebuild 5995 BLAKE2B f07fbdeb0e743d0d6b72a26af6f7ab81f790b45419b909b7ba83b444875e51c64f62c33a2255ec81ffedfcaa4f1bd6906cf238754b71d9916ef1527f079b4a49 SHA512 a9138e1818fb59be2b03e3c681a50d7862358aa4f32590f796f166ead82fc5f341e9ddbeb0729347eee29cd6d84072079cd2e839c7f45d3b6a2d3f7abcac48ed
EBUILD libcxx-8.0.1.ebuild 6539 BLAKE2B 4903d2f0c2102d4c2d373d1ce17d092adddc666e982593bab358af93360c72de2e80b1476383609ee01decaae9c08dd6ae1d473d58caefeb325cabc1042cb9b1 SHA512 5c3627016de412cfe281b2cf7579c4f68a7ae4ba087cf5ab567f0fc24c5585939ec5f7044134df4d2bcd67e5d19e1344e43b37de485f9f2572c04aa405cf8c22
EBUILD libcxx-9.0.1.ebuild 6398 BLAKE2B 0bf084d925f6633809763077300f2221bd7fd67f2d29b1f4febc436b7ff658c51deb7b614807eb9459f466a120e9f7420cf047a1f5583effd48544bdc51aa344 SHA512 77898701b515982851e2e49436705c9166f9c82c011b967b942f3c4f8d2466692e89883d18b28b1ad886692d37b02234a14a80c965c12fc2675fc40baacceebc
diff --git a/sys-libs/libcxx/libcxx-10.0.0.ebuild b/sys-libs/libcxx/libcxx-10.0.0.ebuild
index 20a1d2faae62..28d80ab3f631 100644
--- a/sys-libs/libcxx/libcxx-10.0.0.ebuild
+++ b/sys-libs/libcxx/libcxx-10.0.0.ebuild
@@ -14,7 +14,7 @@ llvm.org_set_globals
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~x86"
IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind +static-libs test"
REQUIRED_USE="libunwind? ( libcxxabi )"
RESTRICT="!test? ( test )"
diff --git a/sys-libs/libcxx/libcxx-10.0.1_rc2.ebuild b/sys-libs/libcxx/libcxx-10.0.1_rc2.ebuild
new file mode 100644
index 000000000000..f96a537e3541
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-10.0.1_rc2.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+PYTHON_COMPAT=( python3_{6..9} )
+inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+LLVM_COMPONENTS=( libcxx )
+llvm.org_set_globals
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind +static-libs test"
+REQUIRED_USE="libunwind? ( libcxxabi )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
+# llvm-6 for new lit options
+# clang-3.9.0 installs necessary target symlinks unconditionally
+# which removes the need for MULTILIB_USEDEP
+DEPEND="${RDEPEND}
+ >=sys-devel/llvm-6"
+BDEPEND="
+ test? ( >=sys-devel/clang-3.9.0
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
+
+DOCS=( CREDITS.TXT )
+
+python_check_deps() {
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+}
+
+src_prepare() {
+ # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
+ # out-of-tree build.
+ eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
+
+ llvm.org_src_prepare
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # note: we need to do this before multilib kicks in since it will
+ # alter the CHOST
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # we want -lgcc_s for unwinder, and for compiler runtime when using
+ # gcc, clang with gcc runtime (or any unknown compiler)
+ local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
+ if use libunwind; then
+ # work-around missing -lunwind upstream
+ extra_libs+=( -lunwind )
+ # if we're using libunwind and clang with compiler-rt, we want
+ # to link to compiler-rt instead of -lgcc_s
+ if tc-is-clang; then
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+ ${LDFLAGS} -print-libgcc-file-name)
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then
+ want_gcc_s=OFF
+ want_compiler_rt=ON
+ extra_libs+=( "${compiler_rt}" )
+ fi
+ fi
+ fi
+
+ # bootstrap: cmake is unhappy if compiler can't link to stdlib
+ local nolib_flags=( -nodefaultlibs -lc )
+ if ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
+ -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
+ )
+
+ if use test; then
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-libcxx
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ local libdir=$(get_libdir)
+ local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
+
+ # Move it first.
+ mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=" libpthread.a libdl.a"
+
+ gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
+}
+
+gen_shared_ldscript() {
+ local libdir=$(get_libdir)
+ # libsupc++ doesn't have a shared version
+ local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
+
+ mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
+ local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
+
+ gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
+}
+
+multilib_src_install() {
+ cmake_src_install
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+}
+
+pkg_postinst() {
+ elog "This package (${PN}) is mainly intended as a replacement for the C++"
+ elog "standard library when using clang."
+ elog "To use it, instead of libstdc++, use:"
+ elog " clang++ -stdlib=libc++"
+ elog "to compile your C++ programs."
+}