summaryrefslogtreecommitdiff
path: root/sys-libs/libcxx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-27 20:49:18 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-27 20:49:18 +0000
commitc5ee568457ac776b65b71fa444e0dd47535bc44a (patch)
tree1aa40f593e598d7c8352c1d99a30ff9315e690af /sys-libs/libcxx
parent8eccda982236f2cfe9188bdcaffd9168134f39a9 (diff)
gentoo auto-resync : 27:01:2023 - 20:49:18
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/Manifest2
-rw-r--r--sys-libs/libcxx/libcxx-16.0.0_pre20230127.ebuild204
2 files changed, 206 insertions, 0 deletions
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 7260f543a8ff..5473c74e65da 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -5,6 +5,7 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.tar.gz 180436731 BLAKE2B 51c30c3f11dd55a225b8ebe4ded752ce9e8eb58751e7458c29901dbdd3673f94892d337d111d696e779e3f7ef0bca6c7d79709e2072a4bf3a001d8813125d571 SHA512 ebbe0f8becac39d63433dcc3de474c40f1215fc8faab94fa2ba869d28e66b27e4fe088377bd7ae64575a6d7b07017b88bf92e5488a3185a753e647d8da352bbf
DIST llvm-project-6dc85bd3fde7df2999fda07e9e9f2e83d52c6125.tar.gz 175208511 BLAKE2B cf87cf7e9bf7c74aab8ccda0f153369cb81798047fdd48025c3c7030857b128babbaafb667385a5c8e9916e16038b14fee39f1623d329471e73c39c2f2d7bbfa SHA512 e6dc0cacd6c079be8a00364e4c244782d764d9a8d514d65f9078427cb4a0c1663ff88761bfbc1e955a1a990451439110497c2cb7af7f56b2c91f2e9db4389894
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
EBUILD libcxx-13.0.1.ebuild 6768 BLAKE2B 36c10303fd96a4e4abc70f7fca2b1206cb32ecb4130061ac13ca29970c68d3ef5540b00dafd34c03f2052ee8c099f20d561c4572ffc65b73ea6dd5ace6aba4b5 SHA512 c067b3c184667dad0deb3c2fd345de4f863ee1d4583f883b9a848d61a980b13c707bc434454b98fc815d234a1975ab5fc76c0fc28ebcf54fb5868918b12dc593
@@ -13,5 +14,6 @@ EBUILD libcxx-15.0.7-r1.ebuild 5306 BLAKE2B 346390544e06d0fac9c21e341ab97a40b51c
EBUILD libcxx-15.0.7.ebuild 5281 BLAKE2B 91ef259e7e911d759553378e78dadac1f69a8d890eaec9572d987674b22943b07ae83bd6c7fa6f0968da0bb14709436117ca6beb7786fa329dfebb268273e0fd SHA512 038ccd5504bbb990f8b6bf35ed64ca197a84f14e2860e277bd488693e583474332c73afd1a48911786b6352373a1f09763899d2408907ada836a992cb733ed43
EBUILD libcxx-16.0.0.9999.ebuild 5238 BLAKE2B d31f97c2b6fad3c8b357cf1d9c2bbcf52fcf8ddef4cd5e52a1e5a8d413751441032cc964eeb4ea3509e3ee16aab6342dcbd38a9b7e7d9299021834e834054c37 SHA512 4c7f95ca928f5d7dcada11ae250a0468a3797bf024985635eaf815dab7341863bd7add87abd459e49a2fa0b19b12ae87cfe6d5799780f1594130eb134e4347ff
EBUILD libcxx-16.0.0_pre20230107.ebuild 5244 BLAKE2B 293399fe1fc0f91f115697a27d265f422e1c9535e0cfad5087a3faa3a9660e4e4210acf61bb4863d9c3fb4899eb23d74ceb8d6103da405eed47cb9157a413305 SHA512 c7ec13ea1c4a6e867fce9971b6fcfc4ab4c862f36a67c8b0484ebfe7708f0455310b9475c581ac1d635344db2a544eedf5649b0633900b10000f1ee0e9f065b9
+EBUILD libcxx-16.0.0_pre20230127.ebuild 5238 BLAKE2B d31f97c2b6fad3c8b357cf1d9c2bbcf52fcf8ddef4cd5e52a1e5a8d413751441032cc964eeb4ea3509e3ee16aab6342dcbd38a9b7e7d9299021834e834054c37 SHA512 4c7f95ca928f5d7dcada11ae250a0468a3797bf024985635eaf815dab7341863bd7add87abd459e49a2fa0b19b12ae87cfe6d5799780f1594130eb134e4347ff
EBUILD libcxx-17.0.0.9999.ebuild 5238 BLAKE2B d31f97c2b6fad3c8b357cf1d9c2bbcf52fcf8ddef4cd5e52a1e5a8d413751441032cc964eeb4ea3509e3ee16aab6342dcbd38a9b7e7d9299021834e834054c37 SHA512 4c7f95ca928f5d7dcada11ae250a0468a3797bf024985635eaf815dab7341863bd7add87abd459e49a2fa0b19b12ae87cfe6d5799780f1594130eb134e4347ff
MISC metadata.xml 718 BLAKE2B 3cc1e43a6f1ada368cfc0bf8aaf49007f6792062b684ab9299b5180d778b158325b6931169b52dd14e85ae9ad6dc1a03be323b814fb920fe8434ad86425d699c SHA512 c2cef3e481c0c3db7de6de8c0a5aff42a1e7fe81155d99f1f0f0988f6d5ca041f787a27a2dde0073037d59e082e2f6da7eefe1303f1c1837ebc12e8e0d28729f
diff --git a/sys-libs/libcxx/libcxx-16.0.0_pre20230127.ebuild b/sys-libs/libcxx/libcxx-16.0.0_pre20230127.ebuild
new file mode 100644
index 000000000000..4eeb65e55e83
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-16.0.0_pre20230127.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
+ toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="+clang +libcxxabi static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libcxxabi? (
+ ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
+ )
+ !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ >=dev-util/cmake-3.16
+ sys-devel/gdb[python]
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ fi
+ 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
+}
+
+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=system-libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
+ 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() {
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ # 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=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES=libcxx
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_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_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+ fi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxx
+}
+
+multilib_src_install() {
+ cmake_src_install
+ # since we've replaced libc++.{a,so} with ldscripts, now we have to
+ # install the extra symlinks
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ dolib.so lib/libc++_shared.so
+ use static-libs && dolib.a lib/libc++_static.a
+ fi
+}
+
+# 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() {
+ # Move it first.
+ mv lib/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
+ $(usex libcxxabi libc++abi.a libsupc++.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[*]}" > lib/libc++.a || die
+}
+
+gen_shared_ldscript() {
+ # Move it first.
+ mv lib/libc++{,_shared}.so || die
+ local deps=(
+ libc++_shared.so
+ # libsupc++ doesn't have a shared version
+ $(usex libcxxabi libc++abi.so libsupc++.a)
+ )
+
+ gen_ldscript "${deps[*]}" > lib/libc++.so || die
+}