summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-04 21:14:48 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-04 21:14:48 +0000
commit2997df5d95cb64694ec91d50c93407e92c68e2a8 (patch)
tree4cc7277d0f8e23337b953de5f5b0a374ca2366e5 /sys-libs
parent0a18aff6704a42e6affa21ec92064d29fc7f8646 (diff)
gentoo auto-resync : 04:02:2023 - 21:14:48
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/Manifest.gzbin14721 -> 14732 bytes
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest2
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230203.ebuild216
-rw-r--r--sys-libs/compiler-rt/Manifest2
-rw-r--r--sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230203.ebuild149
-rw-r--r--sys-libs/libcxx/Manifest2
-rw-r--r--sys-libs/libcxx/libcxx-17.0.0_pre20230203.ebuild204
-rw-r--r--sys-libs/libcxxabi/Manifest2
-rw-r--r--sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230203.ebuild116
-rw-r--r--sys-libs/libomp/Manifest2
-rw-r--r--sys-libs/libomp/libomp-17.0.0_pre20230203.ebuild148
-rw-r--r--sys-libs/llvm-libunwind/Manifest2
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230203.ebuild123
13 files changed, 968 insertions, 0 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz
index c2f293108df1..fe43dc521b12 100644
--- a/sys-libs/Manifest.gz
+++ b/sys-libs/Manifest.gz
Binary files differ
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index 6a248088d76c..263fab22adaf 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,5 +1,6 @@
DIST llvm-gentoo-patchset-14.0.6-r3.tar.xz 16904 BLAKE2B ebf67455071d6d3744cfc0491b8a33c4c63bfdbcf668565fa0718f6cdb01bced53be9d1cdf6774f6cd8427c07c0ede69503d74cf3574642a6967b38730248ebb SHA512 adc5a3212657d1defa7b720d1a7e9e91586439a34964d44b6897d21be3d208bd15c04bf20502dd7125ef8c368defaeea146eb844ca321be56eebcee52be606a9
DIST llvm-gentoo-patchset-15.0.7.tar.xz 19300 BLAKE2B b70e81d744c2eba5cd851e7b690ce8979b3064973f522be7c93bfb541860000a4bc8b17219f8788dfc8a527217dd13946cf7836640698ddd3d4b3fde493dfbf8 SHA512 daffff6ae4a0874aff1a423b4bb36701ecb5a35a36ae91d4ed7fda58b83e50ffcdc30498c84be4711fd3e1f227bf312dbe930019203e0a131944439af2aa94f7
+DIST llvm-project-08c915fa76ef91efa16df0676ed69e4fb360989f.tar.gz 179571827 BLAKE2B 856ea5787f5b3a0b3e8816ccc1a7016a5a7140da6a61544a9829625255dc7036b321b43421f4b3a21e4f0cd8a36745e5d26cb828a41c49a690ebefdff88a744c SHA512 a83121dfaad3e93bad072557715ff857eb8b912273e3a36ea13c2f6a706aa4a9233398ac56074f2cfb5de49982fb5df5e2893eddbe2fd580a51aa08a03c95e34
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -15,4 +16,5 @@ EBUILD compiler-rt-sanitizers-16.0.0_pre20230107.ebuild 6254 BLAKE2B cf7575a46a8
EBUILD compiler-rt-sanitizers-16.0.0_pre20230127.ebuild 6248 BLAKE2B 8548074a3b572bc5b19e9a70ed91225678172cb43b71ad501811d3741367c56f1ffe0e1b528934f620e7d8a30bd1fc463ada54113bea16c322f1d821a8503756 SHA512 8825b15e4965e58365a96517831120e1d5c02130f83cc1150b7a107142782cee74830d3dc0234453291d0f487789cd005303d47269381ad45356e4fd779decf5
EBUILD compiler-rt-sanitizers-16.0.0_rc1.ebuild 6254 BLAKE2B cf7575a46a8678ff6ed69bb3e5863b062948af66bee98d60be8e728d30095ee34272b5a89d99bb31ee6ae87e3831cbb8120bc9f62ce0a0662caf42126582aa72 SHA512 da6daf348f285fe8c56d707fe185318647eb08bc6decc614d4b7f690f729fe4ae5580bc9d216aeb2a18881a729ed50cacf2d32a591c768ccc095e43969ac7b6b
EBUILD compiler-rt-sanitizers-17.0.0.9999.ebuild 6248 BLAKE2B 8548074a3b572bc5b19e9a70ed91225678172cb43b71ad501811d3741367c56f1ffe0e1b528934f620e7d8a30bd1fc463ada54113bea16c322f1d821a8503756 SHA512 8825b15e4965e58365a96517831120e1d5c02130f83cc1150b7a107142782cee74830d3dc0234453291d0f487789cd005303d47269381ad45356e4fd779decf5
+EBUILD compiler-rt-sanitizers-17.0.0_pre20230203.ebuild 6248 BLAKE2B 8548074a3b572bc5b19e9a70ed91225678172cb43b71ad501811d3741367c56f1ffe0e1b528934f620e7d8a30bd1fc463ada54113bea16c322f1d821a8503756 SHA512 8825b15e4965e58365a96517831120e1d5c02130f83cc1150b7a107142782cee74830d3dc0234453291d0f487789cd005303d47269381ad45356e4fd779decf5
MISC metadata.xml 1412 BLAKE2B 75675507000fa6a6b8182e6b45a08a2716ae7fb9a7e3428dc8420464e4c1d1bdb5bea62cc2f553c579de5a4faa752b35cb3529d980fb07a055ff4ddf6e752707 SHA512 f05ea5168b923db72f4f5b53e9b748ebbcdae9eff09d86323313055933b47fc0089e1b2d73cd997d73dcfb2dca032344955816425fbddc09d27ca751463aadbb
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230203.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230203.ebuild
new file mode 100644
index 000000000000..cc599404c49c
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230203.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS=""
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+# base targets
+IUSE+=" +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+ asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+ shadowcallstack gwp-asan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+ || ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+ test? (
+ cfi? ( ubsan )
+ gwp-asan? ( scudo )
+ )
+"
+RESTRICT="
+ !clang? ( test )
+ !test? ( test )
+"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+ virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+ >=dev-util/cmake-3.16
+ clang? ( sys-devel/clang )
+ elibc_glibc? ( net-libs/libtirpc )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ sys-libs/compiler-rt:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+ if use test; then
+ local CHECKREQS_DISK_BUILD=11G
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_space
+}
+
+pkg_setup() {
+ check_space
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+ local flag
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if ! use "${flag}"; then
+ local cmake_flag=${flag/-/_}
+ sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+ cmake/config-ix.cmake || die
+ fi
+ done
+
+ # TODO: fix these tests to be skipped upstream
+ if use asan && ! use profile; then
+ rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+ fi
+ if use ubsan && ! use cfi; then
+ > test/cfi/CMakeLists.txt || die
+ fi
+
+ llvm.org_src_prepare
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ local flag want_sanitizer=OFF
+ for flag in "${SANITIZER_FLAGS[@]}"; do
+ if use "${flag}"; then
+ want_sanitizer=ON
+ break
+ fi
+ done
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+ # use a build dir structure consistent with install
+ # this makes it possible to easily deploy test-friendly clang
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ # builtins & crt installed by sys-libs/compiler-rt
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF
+ -DCOMPILER_RT_BUILD_CRT=OFF
+ -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+ -DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+ -DCOMPILER_RT_BUILD_ORC=$(usex orc)
+ -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+ -DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+ -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ # they are created during src_test()
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+
+ # same flags are passed for build & tests, so we need to strip
+ # them down to a subset supported by clang
+ CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+ strip-unsupported-flags
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX
+ # This disables i386 for SDK >= 10.15
+ # Will error if has_use tsan and SDK < 10.12
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ cmake_src_configure
+
+ if use test; then
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+ # copy clang over since resource_dir is located relatively to binary
+ # therefore, we can put our new libraries in it
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+ cp "${sys_dir}"/*builtins*.a \
+ "${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+ # we also need LLVMgold.so for gold-based tests
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+ fi
+ fi
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ # disable sandbox to have it stop clobbering LD_PRELOAD
+ local -x SANDBOX_ON=0
+ # wipe LD_PRELOAD to make ASAN happy
+ local -x LD_PRELOAD=
+
+ cmake_build check-all
+}
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index d636aa299f28..a832942e7d99 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,5 +1,6 @@
DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
DIST llvm-gentoo-patchset-15.0.7.tar.xz 19300 BLAKE2B b70e81d744c2eba5cd851e7b690ce8979b3064973f522be7c93bfb541860000a4bc8b17219f8788dfc8a527217dd13946cf7836640698ddd3d4b3fde493dfbf8 SHA512 daffff6ae4a0874aff1a423b4bb36701ecb5a35a36ae91d4ed7fda58b83e50ffcdc30498c84be4711fd3e1f227bf312dbe930019203e0a131944439af2aa94f7
+DIST llvm-project-08c915fa76ef91efa16df0676ed69e4fb360989f.tar.gz 179571827 BLAKE2B 856ea5787f5b3a0b3e8816ccc1a7016a5a7140da6a61544a9829625255dc7036b321b43421f4b3a21e4f0cd8a36745e5d26cb828a41c49a690ebefdff88a744c SHA512 a83121dfaad3e93bad072557715ff857eb8b912273e3a36ea13c2f6a706aa4a9233398ac56074f2cfb5de49982fb5df5e2893eddbe2fd580a51aa08a03c95e34
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -15,4 +16,5 @@ EBUILD compiler-rt-16.0.0_pre20230107.ebuild 4170 BLAKE2B 5c863321f73c784ae997fe
EBUILD compiler-rt-16.0.0_pre20230127.ebuild 4164 BLAKE2B 332c450aab09115e23d14304e1f1bfa8c9482ced7acff7d6b80ac09d88f6d5a1481f090c837a7876bc264e3f1451b3bc5f285a71a38a7bf64ad3845299ca9b59 SHA512 7dcaae258434c5cce6b225c49b71e1987ac5af36f83ce25962ade4b2c836f13034fb54fed2723e7d089dc77b20159c0dd04c67f9a6928b62550d594db7f98cc2
EBUILD compiler-rt-16.0.0_rc1.ebuild 4170 BLAKE2B 5c863321f73c784ae997fe46377fc6525ece43664cd41c8a8178aa764f820788c6b8072a99f0d79246721cbfdbba99cb06faacf93509246a94242af35f6820b7 SHA512 2eb75d0677db0d1ff130849651dae53c2f180a78e8103f012e4c4dc6d967db533b4457647221aa85a26adbb04c936ccbe18d5ad29a571554773049951e5b8de1
EBUILD compiler-rt-17.0.0.9999.ebuild 4164 BLAKE2B 332c450aab09115e23d14304e1f1bfa8c9482ced7acff7d6b80ac09d88f6d5a1481f090c837a7876bc264e3f1451b3bc5f285a71a38a7bf64ad3845299ca9b59 SHA512 7dcaae258434c5cce6b225c49b71e1987ac5af36f83ce25962ade4b2c836f13034fb54fed2723e7d089dc77b20159c0dd04c67f9a6928b62550d594db7f98cc2
+EBUILD compiler-rt-17.0.0_pre20230203.ebuild 4164 BLAKE2B 332c450aab09115e23d14304e1f1bfa8c9482ced7acff7d6b80ac09d88f6d5a1481f090c837a7876bc264e3f1451b3bc5f285a71a38a7bf64ad3845299ca9b59 SHA512 7dcaae258434c5cce6b225c49b71e1987ac5af36f83ce25962ade4b2c836f13034fb54fed2723e7d089dc77b20159c0dd04c67f9a6928b62550d594db7f98cc2
MISC metadata.xml 416 BLAKE2B 79a58249c94b605ba57f346c4e05b43853cf6cfb8bb65a4f4e3c44039cccfdb83dd31bfaaaf398bcbdc393efabdfc7ed186fe775976c46227e74decf2c8f4fb2 SHA512 ce30c79a575e5933effb1fec36f9a4ef02d9f97f312feb39c55a88cbda9a1bae1d7af2ec4ad5f66212cbb2cdbfb26f1a436689f16f410153c9d65eb010264c48
diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230203.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230203.ebuild
new file mode 100644
index 000000000000..2ed5fc860074
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230203.ebuild
@@ -0,0 +1,149 @@
+# 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 flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS=""
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ >=dev-util/cmake-3.16
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+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
+}
+
+test_compiler() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang; then
+ # Only do this conditionally to allow overriding with
+ # e.g. CC=clang-13 in case of breakage
+ if ! tc-is-clang ; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ fi
+
+ strip-unsupported-flags
+ fi
+
+ if ! test_compiler; then
+ local nolib_flags=( -nodefaultlibs -lc )
+
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then
+ # Avoiding -nostartfiles earlier on for bug #862540,
+ # and set available entry symbol for bug #862798.
+ nolib_flags+=( -nostartfiles -emain )
+
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_ORC=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ if use amd64; then
+ mycmakeargs+=(
+ -DCAN_TARGET_i386=$(usex abi_x86_32)
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64)
+ )
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+ # this allows adding arm64 support using SDK in EPREFIX
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+ # Set version based on the SDK in EPREFIX.
+ # This disables i386 for SDK >= 10.15
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+ # Use our libtool instead of looking it up with xcrun
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+ )
+ fi
+
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index dc1092f58f8d..b2f401d7b24b 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,5 +1,6 @@
DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
DIST llvm-gentoo-patchset-15.0.7-r1.tar.xz 21400 BLAKE2B 6b149cb721ac476b728bf9b0197f630d3db40622b85e3d099cdbc1d85ec14872d4e1eb0c94be6edc20fc6187da29b42f934dfb765f2077425a5b919900bb97c0 SHA512 d84d48caa3781633c7c6147e0b786417e93e4b5c9d1393809164e6d355a56673013ed0ea9bc3309488d7cfb794c1b336c888adc52dcd95e70c16d9208c36bd15
+DIST llvm-project-08c915fa76ef91efa16df0676ed69e4fb360989f.tar.gz 179571827 BLAKE2B 856ea5787f5b3a0b3e8816ccc1a7016a5a7140da6a61544a9829625255dc7036b321b43421f4b3a21e4f0cd8a36745e5d26cb828a41c49a690ebefdff88a744c SHA512 a83121dfaad3e93bad072557715ff857eb8b912273e3a36ea13c2f6a706aa4a9233398ac56074f2cfb5de49982fb5df5e2893eddbe2fd580a51aa08a03c95e34
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -16,4 +17,5 @@ EBUILD libcxx-16.0.0_pre20230107.ebuild 5244 BLAKE2B 293399fe1fc0f91f115697a27d2
EBUILD libcxx-16.0.0_pre20230127.ebuild 5238 BLAKE2B d31f97c2b6fad3c8b357cf1d9c2bbcf52fcf8ddef4cd5e52a1e5a8d413751441032cc964eeb4ea3509e3ee16aab6342dcbd38a9b7e7d9299021834e834054c37 SHA512 4c7f95ca928f5d7dcada11ae250a0468a3797bf024985635eaf815dab7341863bd7add87abd459e49a2fa0b19b12ae87cfe6d5799780f1594130eb134e4347ff
EBUILD libcxx-16.0.0_rc1.ebuild 5244 BLAKE2B 293399fe1fc0f91f115697a27d265f422e1c9535e0cfad5087a3faa3a9660e4e4210acf61bb4863d9c3fb4899eb23d74ceb8d6103da405eed47cb9157a413305 SHA512 c7ec13ea1c4a6e867fce9971b6fcfc4ab4c862f36a67c8b0484ebfe7708f0455310b9475c581ac1d635344db2a544eedf5649b0633900b10000f1ee0e9f065b9
EBUILD libcxx-17.0.0.9999.ebuild 5238 BLAKE2B d31f97c2b6fad3c8b357cf1d9c2bbcf52fcf8ddef4cd5e52a1e5a8d413751441032cc964eeb4ea3509e3ee16aab6342dcbd38a9b7e7d9299021834e834054c37 SHA512 4c7f95ca928f5d7dcada11ae250a0468a3797bf024985635eaf815dab7341863bd7add87abd459e49a2fa0b19b12ae87cfe6d5799780f1594130eb134e4347ff
+EBUILD libcxx-17.0.0_pre20230203.ebuild 5238 BLAKE2B d31f97c2b6fad3c8b357cf1d9c2bbcf52fcf8ddef4cd5e52a1e5a8d413751441032cc964eeb4ea3509e3ee16aab6342dcbd38a9b7e7d9299021834e834054c37 SHA512 4c7f95ca928f5d7dcada11ae250a0468a3797bf024985635eaf815dab7341863bd7add87abd459e49a2fa0b19b12ae87cfe6d5799780f1594130eb134e4347ff
MISC metadata.xml 718 BLAKE2B 3cc1e43a6f1ada368cfc0bf8aaf49007f6792062b684ab9299b5180d778b158325b6931169b52dd14e85ae9ad6dc1a03be323b814fb920fe8434ad86425d699c SHA512 c2cef3e481c0c3db7de6de8c0a5aff42a1e7fe81155d99f1f0f0988f6d5ca041f787a27a2dde0073037d59e082e2f6da7eefe1303f1c1837ebc12e8e0d28729f
diff --git a/sys-libs/libcxx/libcxx-17.0.0_pre20230203.ebuild b/sys-libs/libcxx/libcxx-17.0.0_pre20230203.ebuild
new file mode 100644
index 000000000000..4eeb65e55e83
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-17.0.0_pre20230203.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
+}
diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
index 8fcc50a10808..ed9405135e20 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -1,3 +1,4 @@
+DIST llvm-project-08c915fa76ef91efa16df0676ed69e4fb360989f.tar.gz 179571827 BLAKE2B 856ea5787f5b3a0b3e8816ccc1a7016a5a7140da6a61544a9829625255dc7036b321b43421f4b3a21e4f0cd8a36745e5d26cb828a41c49a690ebefdff88a744c SHA512 a83121dfaad3e93bad072557715ff857eb8b912273e3a36ea13c2f6a706aa4a9233398ac56074f2cfb5de49982fb5df5e2893eddbe2fd580a51aa08a03c95e34
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -13,4 +14,5 @@ EBUILD libcxxabi-16.0.0_pre20230107.ebuild 2872 BLAKE2B 9a0dd0aa38b9e6229d49c96c
EBUILD libcxxabi-16.0.0_pre20230127.ebuild 2866 BLAKE2B 8eb6ad38adec95b1dfda64dfff47255bd19841975520320f9842ddd79b1162674dcc933d167585ed6f497c5b54095d8aa96b0af9335f1fa8bfb27619668f0c91 SHA512 be61b1a89549b0d531795483e350924ffc03f85bf0fb2f5fbf75a743d56e8da95598fb4f114ce2c3ffa903254dbbe35f171aacad7ce3cd5f358ca1d763d4934e
EBUILD libcxxabi-16.0.0_rc1.ebuild 2872 BLAKE2B 9a0dd0aa38b9e6229d49c96c4a7b97cfba583702c0fcd620cd570a9e2428b59ac0f1aa02153aba54c0a9187f07fd2ff85aec9e4df072d2f64f5af371c54a9b28 SHA512 85ad4be182dee73e514ed4d69ae6ad570c0854a79ed2d5660c86ed12f794ab6107564d6d46ee79933e3690f79a81bc573afa9cd194548dd9c68347bea4c79b17
EBUILD libcxxabi-17.0.0.9999.ebuild 2866 BLAKE2B 8eb6ad38adec95b1dfda64dfff47255bd19841975520320f9842ddd79b1162674dcc933d167585ed6f497c5b54095d8aa96b0af9335f1fa8bfb27619668f0c91 SHA512 be61b1a89549b0d531795483e350924ffc03f85bf0fb2f5fbf75a743d56e8da95598fb4f114ce2c3ffa903254dbbe35f171aacad7ce3cd5f358ca1d763d4934e
+EBUILD libcxxabi-17.0.0_pre20230203.ebuild 2866 BLAKE2B 8eb6ad38adec95b1dfda64dfff47255bd19841975520320f9842ddd79b1162674dcc933d167585ed6f497c5b54095d8aa96b0af9335f1fa8bfb27619668f0c91 SHA512 be61b1a89549b0d531795483e350924ffc03f85bf0fb2f5fbf75a743d56e8da95598fb4f114ce2c3ffa903254dbbe35f171aacad7ce3cd5f358ca1d763d4934e
MISC metadata.xml 557 BLAKE2B 4f6b0acb7cfdf74971a6fd96051d9f9020141c6117333a8de42bd043935b7bff8d9942faabdf3b1c94597c460393f64eb7d3f7b7d49f39ecfd0094de460f563e SHA512 67a812ef768e681ae77ef6e13bccffcbe53b41e94901f0558b3c7acaf896605ca670c4bb5a690bd9afa3b5a76271341710520a6abc0024c18f437fabde20e847
diff --git a/sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230203.ebuild b/sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230203.ebuild
new file mode 100644
index 000000000000..e5f19fc61a28
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230203.ebuild
@@ -0,0 +1,116 @@
+# 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="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="+clang static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+ !<sys-libs/libcxx-15
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+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
+}
+
+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
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=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_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 45e3deb25a8c..a127f06f6d2b 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -1,4 +1,5 @@
DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
+DIST llvm-project-08c915fa76ef91efa16df0676ed69e4fb360989f.tar.gz 179571827 BLAKE2B 856ea5787f5b3a0b3e8816ccc1a7016a5a7140da6a61544a9829625255dc7036b321b43421f4b3a21e4f0cd8a36745e5d26cb828a41c49a690ebefdff88a744c SHA512 a83121dfaad3e93bad072557715ff857eb8b912273e3a36ea13c2f6a706aa4a9233398ac56074f2cfb5de49982fb5df5e2893eddbe2fd580a51aa08a03c95e34
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -14,4 +15,5 @@ EBUILD libomp-16.0.0_pre20230107.ebuild 3450 BLAKE2B c698732a256b4236436f8228e33
EBUILD libomp-16.0.0_pre20230127.ebuild 3769 BLAKE2B a5c3ebbfd36869cb4ab676d40f374391e394cee4e2eb2d77c4cdf605ec4b36736621fd7883c3a509922c8140f235ced7b3e6e6267510c771c53271647bd2e5b1 SHA512 c1b55fa30e12c856830fb31e02f31b23c2f64741b8da46a8ac1982718064b6203754919fbfaa99e7850503b325263ec987b87aac0c6955d3b712399548ab13a5
EBUILD libomp-16.0.0_rc1.ebuild 3775 BLAKE2B 5da785f39a2f450394a6fb28fcc7af2af80946784b7c0bd322e5771fd2edd44e275033ea93f194846ebad8156efc03f77a21ad22a90c7e11df134010c21b1604 SHA512 804d935f0344089105426b6acf87c875339f2a51ac2392714586c994547c1feb7183fc8e06bf389d1c67c78c53eba83cb98992a3a2c7961a37a7cdcf04ea8f82
EBUILD libomp-17.0.0.9999.ebuild 3769 BLAKE2B a5c3ebbfd36869cb4ab676d40f374391e394cee4e2eb2d77c4cdf605ec4b36736621fd7883c3a509922c8140f235ced7b3e6e6267510c771c53271647bd2e5b1 SHA512 c1b55fa30e12c856830fb31e02f31b23c2f64741b8da46a8ac1982718064b6203754919fbfaa99e7850503b325263ec987b87aac0c6955d3b712399548ab13a5
+EBUILD libomp-17.0.0_pre20230203.ebuild 3769 BLAKE2B a5c3ebbfd36869cb4ab676d40f374391e394cee4e2eb2d77c4cdf605ec4b36736621fd7883c3a509922c8140f235ced7b3e6e6267510c771c53271647bd2e5b1 SHA512 c1b55fa30e12c856830fb31e02f31b23c2f64741b8da46a8ac1982718064b6203754919fbfaa99e7850503b325263ec987b87aac0c6955d3b712399548ab13a5
MISC metadata.xml 963 BLAKE2B fdea4545db21492049061b85eaa7038965183e10aceae7c41daadc1ce10e7e1bcb2e86344659787ee244360b50b51c99e1a348d3acd2185dac80097541a00dd7 SHA512 c279f8e9c2463dc3f6e02856e520105d6f3321b633439bfe7409bfd6e7e43f1450053dc4f6663492caf7077caf3f4ab0f5cf0161631639e3aefa9ff985dc476f
diff --git a/sys-libs/libomp/libomp-17.0.0_pre20230203.ebuild b/sys-libs/libomp/libomp-17.0.0_pre20230203.ebuild
new file mode 100644
index 000000000000..971931877b19
--- /dev/null
+++ b/sys-libs/libomp/libomp-17.0.0_pre20230203.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit flag-o-matic cmake-multilib linux-info llvm llvm.org
+inherit python-single-r1 toolchain-funcs
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS=""
+IUSE="
+ debug gdb-plugin hwloc offload ompt test
+ llvm_targets_AMDGPU llvm_targets_NVPTX
+"
+REQUIRED_USE="
+ gdb-plugin? ( ${PYTHON_REQUIRED_USE} )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ gdb-plugin? ( ${PYTHON_DEPS} )
+ hwloc? ( >=sys-apps/hwloc-2.5:0=[${MULTILIB_USEDEP}] )
+ offload? (
+ dev-libs/libffi:=[${MULTILIB_USEDEP}]
+ ~sys-devel/llvm-${PV}[${MULTILIB_USEDEP}]
+ )
+"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-lang/perl
+ offload? (
+ llvm_targets_AMDGPU? ( sys-devel/clang )
+ llvm_targets_NVPTX? ( sys-devel/clang )
+ virtual/pkgconfig
+ )
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/lit[${PYTHON_USEDEP}]
+ ')
+ sys-devel/clang
+ )
+"
+
+LLVM_COMPONENTS=( openmp cmake llvm/include )
+llvm.org_set_globals
+
+kernel_pds_check() {
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+ local CONFIG_CHECK="~!SCHED_PDS"
+ local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+ check_extra_config
+ fi
+}
+
+pkg_pretend() {
+ kernel_pds_check
+}
+
+pkg_setup() {
+ use offload && LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ if use gdb-plugin || use test; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+multilib_src_configure() {
+ # LTO causes issues in other packages building, #870127
+ filter-lto
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local build_omptarget=OFF
+ # upstream disallows building libomptarget when sizeof(void*) != 8
+ if use offload &&
+ "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null \
+ <<-EOF &>/dev/null
+ int test[sizeof(void *) == 8 ? 1 : -1];
+ EOF
+ then
+ build_omptarget=ON
+ fi
+
+ local libdir="$(get_libdir)"
+ local mycmakeargs=(
+ -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"
+
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPD_GDB_SUPPORT=$(multilib_native_usex gdb-plugin)
+ -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+
+ -DOPENMP_ENABLE_LIBOMPTARGET=${build_omptarget}
+
+ # do not install libgomp.so & libiomp5.so aliases
+ -DLIBOMP_INSTALL_ALIASES=OFF
+ # disable unnecessary hack copying stuff back to srcdir
+ -DLIBOMP_COPY_EXPORTS=OFF
+ )
+
+ if [[ ${build_omptarget} == ON ]]; then
+ if has "${CHOST%%-*}" aarch64 powerpc64le x86_64; then
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=$(usex llvm_targets_AMDGPU)
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=$(usex llvm_targets_NVPTX)
+ )
+ else
+ mycmakeargs+=(
+ -DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=OFF
+ -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF
+ )
+ fi
+ fi
+
+ use test && mycmakeargs+=(
+ # this project does not use standard LLVM cmake macros
+ -DOPENMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit"
+ -DOPENMP_LIT_ARGS="$(get_lit_flags)"
+
+ -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang")"
+ -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++")"
+ )
+ addpredict /dev/nvidiactl
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-libomp
+}
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index ac63bf31ac98..b986a26ec739 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -1,3 +1,4 @@
+DIST llvm-project-08c915fa76ef91efa16df0676ed69e4fb360989f.tar.gz 179571827 BLAKE2B 856ea5787f5b3a0b3e8816ccc1a7016a5a7140da6a61544a9829625255dc7036b321b43421f4b3a21e4f0cd8a36745e5d26cb828a41c49a690ebefdff88a744c SHA512 a83121dfaad3e93bad072557715ff857eb8b912273e3a36ea13c2f6a706aa4a9233398ac56074f2cfb5de49982fb5df5e2893eddbe2fd580a51aa08a03c95e34
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -13,4 +14,5 @@ EBUILD llvm-libunwind-16.0.0_pre20230107.ebuild 2984 BLAKE2B 89f6251c89eb54defcd
EBUILD llvm-libunwind-16.0.0_pre20230127.ebuild 2978 BLAKE2B 9143fac20e5d73511c56e8015c4758075bf62329b64428b9244812f2fe5fa32772c9ad29e3e7beb1aaa2ff3ef70ee69f9673c0becf7df09f4e2fc5d348c03512 SHA512 b790b15702e2ba0367c771d58dfe975f7b97bb6a90acca97d1180b1b3ba44893575bc92ee1cfe037c308b3191f3d1b8309a0a658cd8617b0993bfa8ce4630d97
EBUILD llvm-libunwind-16.0.0_rc1.ebuild 2984 BLAKE2B 89f6251c89eb54defcddf231cbc4c34005b5d0421e2886b2eebcc1a8f98f88271357e6efac8a46b8d4616912611bf7c935c7cd60b15a6b42f74e3bbedcd629a2 SHA512 d4b223d191f0d0bcd19805050e3e770dc7faf4e68031f329deb085bd1562d278e2eea3f040405526025711d6ac4b390497ecf329f4ab31a00c3edf53186cc2fd
EBUILD llvm-libunwind-17.0.0.9999.ebuild 2978 BLAKE2B 9143fac20e5d73511c56e8015c4758075bf62329b64428b9244812f2fe5fa32772c9ad29e3e7beb1aaa2ff3ef70ee69f9673c0becf7df09f4e2fc5d348c03512 SHA512 b790b15702e2ba0367c771d58dfe975f7b97bb6a90acca97d1180b1b3ba44893575bc92ee1cfe037c308b3191f3d1b8309a0a658cd8617b0993bfa8ce4630d97
+EBUILD llvm-libunwind-17.0.0_pre20230203.ebuild 2978 BLAKE2B 9143fac20e5d73511c56e8015c4758075bf62329b64428b9244812f2fe5fa32772c9ad29e3e7beb1aaa2ff3ef70ee69f9673c0becf7df09f4e2fc5d348c03512 SHA512 b790b15702e2ba0367c771d58dfe975f7b97bb6a90acca97d1180b1b3ba44893575bc92ee1cfe037c308b3191f3d1b8309a0a658cd8617b0993bfa8ce4630d97
MISC metadata.xml 438 BLAKE2B 2a36fbbc59e137056029c62aef6d167d9c82531c2582d7bad5cb13cc36e5c4c9518ffe8c56d06bbcfd97ad22eda71a8b776f3984195f53d06cf45659b438dc00 SHA512 4f18b054072d00e5440faa31a59f9ef587d035b5f25e30913f0b1449debee967fa794fae2548e87db3fb2177ce853ab075e1f11f3cc763f5d7fdf06147108845
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230203.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230203.ebuild
new file mode 100644
index 000000000000..6ffa6c4f81b8
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230203.ebuild
@@ -0,0 +1,123 @@
+# 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="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="+clang debug static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !sys-libs/libunwind
+"
+DEPEND="
+ sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+ !test? (
+ ${PYTHON_DEPS}
+ )
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+
+ # https://github.com/llvm/llvm-project/issues/56825
+ # also separately bug #863917
+ filter-lto
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ # link to compiler-rt
+ # https://github.com/gentoo/gentoo/pull/21516
+ local use_compiler_rt=OFF
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
+
+ local mycmakeargs=(
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libunwind"
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+ -DLIBUNWIND_INSTALL_HEADERS=ON
+
+ # support non-native unwinding; given it's small enough,
+ # enable it unconditionally
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+ # avoid dependency on libgcc_s if compiler-rt is used
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+ )
+ if use test; then
+ mycmakeargs+=(
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=OFF
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=OFF
+ -DLIBCXX_ENABLE_STATIC=ON
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-unwind
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-unwind
+}