summaryrefslogtreecommitdiff
path: root/sys-libs/libcxx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-23 19:01:15 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-23 19:01:15 +0000
commit36fc50e36ed1a4686bb7202aeaff3170b2206124 (patch)
tree7b5feb28a3ad8ba78d57f64c93cc796cff95cd53 /sys-libs/libcxx
parentacc2dacf2ee9a5b03df96da670153f2e3a24d80c (diff)
gentoo auto-resync : 23:03:2024 - 19:01:14
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/Manifest4
-rw-r--r--sys-libs/libcxx/libcxx-17.0.6.ebuild2
-rw-r--r--sys-libs/libcxx/libcxx-19.0.0_pre20240322.ebuild210
3 files changed, 214 insertions, 2 deletions
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index a889df8cd643..f4d9747796ab 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -9,10 +9,12 @@ DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149
DIST llvm-project-18.1.2.src.tar.xz 132060436 BLAKE2B f21fca02fe9e02a3d440595aafbe0572be318ce69cc6285c1bf3dc9187b37ebf4c76f3ea60b6870c441675288f46e5597b069ec451d5026c5161f84daef6b4b2 SHA512 a0d01b018abbdf1609abc7b63911bb4c6c3619b748a0616b66be0843fcaa4240868412c5d1f77fe6dafdfed665b46570e7ce615da58efcaa91e9ddc8481e6fc4
DIST llvm-project-18.1.2.src.tar.xz.sig 566 BLAKE2B 97c6b6b4a041316e70abd54ff715d87a62410fe5590c9b90548fff5a5121d8d5e028ec681f7e99c130d6c6726835365825286ef0a01c82a98394d9369ea7a390 SHA512 1cd8d1c227782cb43e269696045cea500a43f3c6b786f2cda8d380f5b8fc28d3ada11c41c4a252f2d3db465f767b27ea50c5659faa43d4aa5655cc3ffd6243c2
DIST llvm-project-6d3cec01a6c29fa4e51ba129fa13dbf55d2b928e.tar.gz 207700152 BLAKE2B 855720b7a9cc7b1d8fdf398394eb5c702dd615c04e7dad51c449cb1c2f46e75f2ccf2ee10fa3a3403d6aec29f557023a11bd8cdb525bc9c3d76c79f23cd15e82 SHA512 ff6269158e165907c69bd3e4d2d6b87b4f4670546b7e290d7e6665e7097ec887d71174fa37bf5e1755524317e8ae8f0c7c7e428049e8b553faa52c614f1f4490
+DIST llvm-project-f3cfe016c5d8429c0dccfa6f85442e2ea0d45a58.tar.gz 208184654 BLAKE2B abd35798f7c921866bb221cecc42aa94915271d0804acbf44dbe5640efb787ef9d928c329eacde768fac4292217ed4d3c4187fba02dd1c826059aeaa1bad33f0 SHA512 513f7278367114ba3fe3271e8a790b62adbca97d280968537e44e5df9a7afb467a5ca93480f4d4fb7c4d5c0734d00ab54559bf68c00f09a1fcff2fee492aa84f
EBUILD libcxx-15.0.7-r1.ebuild 5283 BLAKE2B 4380fc5b851054a5ec226ee4c92a2b79511d73ac9b3f8bccc977211601eca36113fc0ae605854da53898507021f24a8b319197605c556244d84253bede7b84f4 SHA512 0a5859269422e794deb43ed960651a1dea830af28b5e395f32e28de8e67a1f399507340230af1c84248853f554e751709a60a9a78aeb0eb42804cb41907dbfce
EBUILD libcxx-16.0.6.ebuild 5300 BLAKE2B 4714e22ad2fdcb07c62ead4cfa47fb4734e45dc055700b63a0f24cd6e93dde960c638fa16f55f4c04c6130fc2a7fa5729814c4aee12e9953f603ea5ccb706cc1 SHA512 3eab779107b5c737d971abe29b7bd9f44a73570957bd7d54d6aaa98ec78a6045d7d69272d611f7f09c60e1aa30bbad46b4bd1358b0b2c69e5bc686ab21444857
-EBUILD libcxx-17.0.6.ebuild 5282 BLAKE2B c046d9e3f2b466f5463e10ff253114c014cc35f3f00f372d2df856a768270f3470d94dda9dc0e93f66a13039a5a8001459d8559217c2329df571f14a1625d23a SHA512 8bb2deee9dc94133632e9054412f9796f082632ebfcdd4dd9aa29bf19fd4ded2c98a1e21462b0849abe3cde4c73de97144f9549969710e5826cde742ce236477
+EBUILD libcxx-17.0.6.ebuild 5280 BLAKE2B a882313471af07942a0772efa642800ba85545227f7dfe281cd7fcdc686ecda82692d273550b28cca2de47b1b9fda87717c98c52ffafdf1155d5269a3733f48a SHA512 d9a2932d7b9e26dea0e62dfd3aeac08ad0206a242d3d42d83e55b93cc767195a67bc0eb3da38cb8d51930175f94bac6496184d6d4be516014e0208c3f852d427
EBUILD libcxx-18.1.2.ebuild 5447 BLAKE2B 262f4dd0ccb046dcdf7f6970350381a9a48530f7db546f1b6cef5493b5e2a657a403bb0b5fda0d2d100420c6f8f1bac82f635efa8ad6c70d4476ad101c35eb13 SHA512 74ddb2227a2c8cd3d106861dc8155720f757011933835a36b8a5c133de68db80c14d93ad0cd8c3fa62232ce1e0871889b6db15c4bd53d2c1ea34762d93addc0c
EBUILD libcxx-19.0.0.9999.ebuild 5397 BLAKE2B 800024bbb9b69c7c159d05bf481db08bfb4c89b93a517410a892cd80a0a0bbf07119d0babcc952283bfc4dff51dd4ea4253a63cbc3f301db6e281074e4a2061a SHA512 61a3676d06d6e5f44e5a6f0de8f05c0af5384c3e940b2f504bddbe6b9a806ae5c5ff8311f6986a284338761e554894ddb1bec7f5e1b324a6e211b1d60f0eb635
EBUILD libcxx-19.0.0_pre20240316.ebuild 5397 BLAKE2B 800024bbb9b69c7c159d05bf481db08bfb4c89b93a517410a892cd80a0a0bbf07119d0babcc952283bfc4dff51dd4ea4253a63cbc3f301db6e281074e4a2061a SHA512 61a3676d06d6e5f44e5a6f0de8f05c0af5384c3e940b2f504bddbe6b9a806ae5c5ff8311f6986a284338761e554894ddb1bec7f5e1b324a6e211b1d60f0eb635
+EBUILD libcxx-19.0.0_pre20240322.ebuild 5397 BLAKE2B 800024bbb9b69c7c159d05bf481db08bfb4c89b93a517410a892cd80a0a0bbf07119d0babcc952283bfc4dff51dd4ea4253a63cbc3f301db6e281074e4a2061a SHA512 61a3676d06d6e5f44e5a6f0de8f05c0af5384c3e940b2f504bddbe6b9a806ae5c5ff8311f6986a284338761e554894ddb1bec7f5e1b324a6e211b1d60f0eb635
MISC metadata.xml 598 BLAKE2B b7a60449e0d8e4e7605ec203dfaa45b17a265b024e21a3bcfe05a3aeb6c3d19a1d2a218cb1f9ac9ed52296f0d6e723fed251f364341fb70cbd91b747962db580 SHA512 a23f912efff52c4687767023da826ace8c6e5dcd5e69ece86aabbea99da89e48ba81cdc292f03193e2e8a05743e62ebf4d4735d038e0cc4b42714fa277569335
diff --git a/sys-libs/libcxx/libcxx-17.0.6.ebuild b/sys-libs/libcxx/libcxx-17.0.6.ebuild
index 6cc039d3ed8c..0f39a16ae5e9 100644
--- a/sys-libs/libcxx/libcxx-17.0.6.ebuild
+++ b/sys-libs/libcxx/libcxx-17.0.6.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://libcxx.llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~loong ~riscv ~sparc x86 ~arm64-macos ~x64-macos"
+KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos"
IUSE="+clang +libcxxabi +static-libs test"
REQUIRED_USE="test? ( clang )"
RESTRICT="!test? ( test )"
diff --git a/sys-libs/libcxx/libcxx-19.0.0_pre20240322.ebuild b/sys-libs/libcxx/libcxx-19.0.0_pre20240322.ebuild
new file mode 100644
index 000000000000..e29d57a316d3
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-19.0.0_pre20240322.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit 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"
+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-debug/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() {
+ 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() {
+ # hanging tests
+ # https://github.com/llvm/llvm-project/issues/73791
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || die
+ rm ../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals* || die
+
+ cmake_src_prepare
+}
+
+test_compiler() {
+ $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ llvm_prepend_path "${LLVM_MAJOR}"
+
+ # 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_INSTALL_MODULES=ON
+ -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
+ # this is broken with standalone builds, and also meaningless
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
+ )
+
+ 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
+}