From 71d582d27eeece574ab3d904aa3fbe7742b0e895 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Mar 2023 12:50:15 +0000 Subject: gentoo auto-resync : 25:03:2023 - 12:50:15 --- sys-libs/Manifest.gz | Bin 14923 -> 14921 bytes sys-libs/compiler-rt-sanitizers/Manifest | 2 + ...ompiler-rt-sanitizers-17.0.0_pre20230325.ebuild | 216 +++++++++++++++++++++ sys-libs/compiler-rt/Manifest | 2 + .../compiler-rt-17.0.0_pre20230325.ebuild | 149 ++++++++++++++ sys-libs/libcxx/Manifest | 2 + sys-libs/libcxx/libcxx-17.0.0_pre20230325.ebuild | 204 +++++++++++++++++++ sys-libs/libcxxabi/Manifest | 2 + .../libcxxabi/libcxxabi-17.0.0_pre20230325.ebuild | 116 +++++++++++ sys-libs/libomp/Manifest | 2 + sys-libs/libomp/libomp-17.0.0_pre20230325.ebuild | 151 ++++++++++++++ sys-libs/llvm-libunwind/Manifest | 2 + .../llvm-libunwind-17.0.0_pre20230325.ebuild | 123 ++++++++++++ 13 files changed, 971 insertions(+) create mode 100644 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230325.ebuild create mode 100644 sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230325.ebuild create mode 100644 sys-libs/libcxx/libcxx-17.0.0_pre20230325.ebuild create mode 100644 sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230325.ebuild create mode 100644 sys-libs/libomp/libomp-17.0.0_pre20230325.ebuild create mode 100644 sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230325.ebuild (limited to 'sys-libs') diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz index 866efc9f8f25..f7f27a9fca2c 100644 Binary files a/sys-libs/Manifest.gz and b/sys-libs/Manifest.gz differ diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 8fb32a77f4ad..84e7bc60887f 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-0be1fbac2a7797399c0970e3f4033288036b65f6.tar.gz 181527027 BLAKE2B f2f3b3a33b2a50f3b4f97df16a948e5ed5e642f737de8e852da164aefd3ed9af7bbd0fc1de9f7c9dbee6b9b8ebe11e52af8cc79b8a130cff405fc1238afe217d SHA512 946cd1435a26673c851bdda170864d0c362dfc14d1a7087fbe6303ac79e1821e9c53b72e92d15ad7180b1d6ea3bcc0458e7bec37acc3e8b8bcca8efbb9ff2387 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 compiler-rt-sanitizers-16.0.0.9999.ebuild 6248 BLAKE2B 8548074a3b572bc5b1 EBUILD compiler-rt-sanitizers-16.0.0.ebuild 6550 BLAKE2B a3d856b59f3ad6ce433952a31081576c91576e764119720cf9af44dd54a1813f9f08da03c26cab7a4d00e8b44852197588b14eb52826419b353b44c926cf37bf SHA512 509c25c720fb1f4e3664491f41b23242dd24ba541cc319680cea6e0dc01bebe929af943281fe03473f49fff369b3021cc6abb0d5e6b8b1fd7fabc071961cdaa6 EBUILD compiler-rt-sanitizers-17.0.0.9999.ebuild 6248 BLAKE2B 8548074a3b572bc5b19e9a70ed91225678172cb43b71ad501811d3741367c56f1ffe0e1b528934f620e7d8a30bd1fc463ada54113bea16c322f1d821a8503756 SHA512 8825b15e4965e58365a96517831120e1d5c02130f83cc1150b7a107142782cee74830d3dc0234453291d0f487789cd005303d47269381ad45356e4fd779decf5 EBUILD compiler-rt-sanitizers-17.0.0_pre20230314.ebuild 6248 BLAKE2B 8548074a3b572bc5b19e9a70ed91225678172cb43b71ad501811d3741367c56f1ffe0e1b528934f620e7d8a30bd1fc463ada54113bea16c322f1d821a8503756 SHA512 8825b15e4965e58365a96517831120e1d5c02130f83cc1150b7a107142782cee74830d3dc0234453291d0f487789cd005303d47269381ad45356e4fd779decf5 +EBUILD compiler-rt-sanitizers-17.0.0_pre20230325.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_pre20230325.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230325.ebuild new file mode 100644 index 000000000000..cc599404c49c --- /dev/null +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-17.0.0_pre20230325.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 cd47b1cd10cc..4024e9242f12 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-0be1fbac2a7797399c0970e3f4033288036b65f6.tar.gz 181527027 BLAKE2B f2f3b3a33b2a50f3b4f97df16a948e5ed5e642f737de8e852da164aefd3ed9af7bbd0fc1de9f7c9dbee6b9b8ebe11e52af8cc79b8a130cff405fc1238afe217d SHA512 946cd1435a26673c851bdda170864d0c362dfc14d1a7087fbe6303ac79e1821e9c53b72e92d15ad7180b1d6ea3bcc0458e7bec37acc3e8b8bcca8efbb9ff2387 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 compiler-rt-16.0.0.9999.ebuild 4165 BLAKE2B 5c1747ed91de0ac5c023f933703fa EBUILD compiler-rt-16.0.0.ebuild 4244 BLAKE2B b4fa336d5147d1f452cfe2d423d86a7d3c61747c537c7ad6d3925c0f8cb375e63a7ca3a233504f246bba3e8571552ee575852ef9d14c4f7386078d89bbda0f90 SHA512 f41f64f6bce1331285993ce6542fca86ae5e8fbe6bf2ebbd7b5393fef8916125efb571d4272d64f25667592f04783992b43feb241d64d3186ceab38a686eb75d EBUILD compiler-rt-17.0.0.9999.ebuild 4165 BLAKE2B 5c1747ed91de0ac5c023f933703fabc2e226f025f8794e09db976b941241c068bb0b241bf9ef6514f01ac2a5642556be7635ddc640710c106c1be10ad3d6241d SHA512 8b293590412b9781aac94517a9e3843d3d08eb20e125fbed48cd28b64acb1cf41087084f652c0e01921ee90509ee2fc3f9ff1a7c6cf6958e82859005559e2573 EBUILD compiler-rt-17.0.0_pre20230314.ebuild 4165 BLAKE2B 5c1747ed91de0ac5c023f933703fabc2e226f025f8794e09db976b941241c068bb0b241bf9ef6514f01ac2a5642556be7635ddc640710c106c1be10ad3d6241d SHA512 8b293590412b9781aac94517a9e3843d3d08eb20e125fbed48cd28b64acb1cf41087084f652c0e01921ee90509ee2fc3f9ff1a7c6cf6958e82859005559e2573 +EBUILD compiler-rt-17.0.0_pre20230325.ebuild 4165 BLAKE2B 5c1747ed91de0ac5c023f933703fabc2e226f025f8794e09db976b941241c068bb0b241bf9ef6514f01ac2a5642556be7635ddc640710c106c1be10ad3d6241d SHA512 8b293590412b9781aac94517a9e3843d3d08eb20e125fbed48cd28b64acb1cf41087084f652c0e01921ee90509ee2fc3f9ff1a7c6cf6958e82859005559e2573 MISC metadata.xml 416 BLAKE2B 79a58249c94b605ba57f346c4e05b43853cf6cfb8bb65a4f4e3c44039cccfdb83dd31bfaaaf398bcbdc393efabdfc7ed186fe775976c46227e74decf2c8f4fb2 SHA512 ce30c79a575e5933effb1fec36f9a4ef02d9f97f312feb39c55a88cbda9a1bae1d7af2ec4ad5f66212cbb2cdbfb26f1a436689f16f410153c9d65eb010264c48 diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230325.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230325.ebuild new file mode 100644 index 000000000000..5abe2bd9bf79 --- /dev/null +++ b/sys-libs/compiler-rt/compiler-rt-17.0.0_pre20230325.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 sys-devel/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 2d6689074646..4097d33bab9c 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-0be1fbac2a7797399c0970e3f4033288036b65f6.tar.gz 181527027 BLAKE2B f2f3b3a33b2a50f3b4f97df16a948e5ed5e642f737de8e852da164aefd3ed9af7bbd0fc1de9f7c9dbee6b9b8ebe11e52af8cc79b8a130cff405fc1238afe217d SHA512 946cd1435a26673c851bdda170864d0c362dfc14d1a7087fbe6303ac79e1821e9c53b72e92d15ad7180b1d6ea3bcc0458e7bec37acc3e8b8bcca8efbb9ff2387 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 libcxx-16.0.0.9999.ebuild 5239 BLAKE2B 397730a8caf3ca40b19225c6742bc88560 EBUILD libcxx-16.0.0.ebuild 5294 BLAKE2B 83f9a04af5773a5dcf9f0ba430684e2527695b9b41b8f704a779abb2a9e74060c8450e888f0ccc89bd5befdb32a93706ad2cb82ba309792a1f79297d8a9315d9 SHA512 deed56905f464c6b0baca63585753dbf8975fd2db72493ff8adda9a4ed8cdcb4ca3ef7fcdea6227d6680dca949963f438aaa36947e9045e98a582813eec4defc EBUILD libcxx-17.0.0.9999.ebuild 5239 BLAKE2B 397730a8caf3ca40b19225c6742bc885608d0ed93b04857992564c5040d2bc2196718b0372b497289616d1b334fca9b5e48b1a87604618a4435570df67bf2db0 SHA512 0f6d63282362faf2e845d65ec7f027d38d4d7fc84bfcb4302951cfe279504742f28404da2286f9c5a7439f56a07c20912bfad9d43a42b5a17e9a8b141b06805b EBUILD libcxx-17.0.0_pre20230314.ebuild 5239 BLAKE2B 397730a8caf3ca40b19225c6742bc885608d0ed93b04857992564c5040d2bc2196718b0372b497289616d1b334fca9b5e48b1a87604618a4435570df67bf2db0 SHA512 0f6d63282362faf2e845d65ec7f027d38d4d7fc84bfcb4302951cfe279504742f28404da2286f9c5a7439f56a07c20912bfad9d43a42b5a17e9a8b141b06805b +EBUILD libcxx-17.0.0_pre20230325.ebuild 5239 BLAKE2B 397730a8caf3ca40b19225c6742bc885608d0ed93b04857992564c5040d2bc2196718b0372b497289616d1b334fca9b5e48b1a87604618a4435570df67bf2db0 SHA512 0f6d63282362faf2e845d65ec7f027d38d4d7fc84bfcb4302951cfe279504742f28404da2286f9c5a7439f56a07c20912bfad9d43a42b5a17e9a8b141b06805b MISC metadata.xml 718 BLAKE2B 3cc1e43a6f1ada368cfc0bf8aaf49007f6792062b684ab9299b5180d778b158325b6931169b52dd14e85ae9ad6dc1a03be323b814fb920fe8434ad86425d699c SHA512 c2cef3e481c0c3db7de6de8c0a5aff42a1e7fe81155d99f1f0f0988f6d5ca041f787a27a2dde0073037d59e082e2f6da7eefe1303f1c1837ebc12e8e0d28729f diff --git a/sys-libs/libcxx/libcxx-17.0.0_pre20230325.ebuild b/sys-libs/libcxx/libcxx-17.0.0_pre20230325.ebuild new file mode 100644 index 000000000000..56140d06df64 --- /dev/null +++ b/sys-libs/libcxx/libcxx-17.0.0_pre20230325.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 sys-devel/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 0023a9802728..095ef1e5aae5 100644 --- a/sys-libs/libcxxabi/Manifest +++ b/sys-libs/libcxxabi/Manifest @@ -1,3 +1,4 @@ +DIST llvm-project-0be1fbac2a7797399c0970e3f4033288036b65f6.tar.gz 181527027 BLAKE2B f2f3b3a33b2a50f3b4f97df16a948e5ed5e642f737de8e852da164aefd3ed9af7bbd0fc1de9f7c9dbee6b9b8ebe11e52af8cc79b8a130cff405fc1238afe217d SHA512 946cd1435a26673c851bdda170864d0c362dfc14d1a7087fbe6303ac79e1821e9c53b72e92d15ad7180b1d6ea3bcc0458e7bec37acc3e8b8bcca8efbb9ff2387 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 @@ -11,4 +12,5 @@ EBUILD libcxxabi-16.0.0.9999.ebuild 2867 BLAKE2B 1565024272821f5db0817703d3c344e EBUILD libcxxabi-16.0.0.ebuild 2922 BLAKE2B deb13575bf9827c2e53b9e9d6179c4cb1db4f6e2a2ab63455a6170883f10c2a2acffd82089e4465f3b07794d16bd81f58edc675a9b5a14a0d3423cc1854b4c57 SHA512 46352684087b70b767fa241510318432491f9aad1f9ea83059093f2ed7af8d61e24884a4958f7008f27ef6735de109084b3b28c8f83db31b6f0cd2830f9480e6 EBUILD libcxxabi-17.0.0.9999.ebuild 2867 BLAKE2B 1565024272821f5db0817703d3c344ef2286c0f8cfd09756a9b9ee75482cb89b618b302162bb1cd6b9a4fab3d5e716853fef94015d254a44bd282c50b2b945cc SHA512 b7d17ef8afb5d4415377a9f2b4c9e6a0defec0262c5c8d730036a1c25e8eb2c8fa79c3d67adef58f33b905d43b80d61934dccf1121b7d0669d6e14905655f421 EBUILD libcxxabi-17.0.0_pre20230314.ebuild 2867 BLAKE2B 1565024272821f5db0817703d3c344ef2286c0f8cfd09756a9b9ee75482cb89b618b302162bb1cd6b9a4fab3d5e716853fef94015d254a44bd282c50b2b945cc SHA512 b7d17ef8afb5d4415377a9f2b4c9e6a0defec0262c5c8d730036a1c25e8eb2c8fa79c3d67adef58f33b905d43b80d61934dccf1121b7d0669d6e14905655f421 +EBUILD libcxxabi-17.0.0_pre20230325.ebuild 2867 BLAKE2B 1565024272821f5db0817703d3c344ef2286c0f8cfd09756a9b9ee75482cb89b618b302162bb1cd6b9a4fab3d5e716853fef94015d254a44bd282c50b2b945cc SHA512 b7d17ef8afb5d4415377a9f2b4c9e6a0defec0262c5c8d730036a1c25e8eb2c8fa79c3d67adef58f33b905d43b80d61934dccf1121b7d0669d6e14905655f421 MISC metadata.xml 557 BLAKE2B 4f6b0acb7cfdf74971a6fd96051d9f9020141c6117333a8de42bd043935b7bff8d9942faabdf3b1c94597c460393f64eb7d3f7b7d49f39ecfd0094de460f563e SHA512 67a812ef768e681ae77ef6e13bccffcbe53b41e94901f0558b3c7acaf896605ca670c4bb5a690bd9afa3b5a76271341710520a6abc0024c18f437fabde20e847 diff --git a/sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230325.ebuild b/sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230325.ebuild new file mode 100644 index 000000000000..16f40d6829fa --- /dev/null +++ b/sys-libs/libcxxabi/libcxxabi-17.0.0_pre20230325.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+=" + !/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 + # prevent trying to access the GPU + -DLIBOMPTARGET_AMDGPU_ARCH=LIBOMPTARGET_AMDGPU_ARCH-NOTFOUND + ) + + 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 d4f4ed24e106..d66ff8d1f097 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -1,3 +1,4 @@ +DIST llvm-project-0be1fbac2a7797399c0970e3f4033288036b65f6.tar.gz 181527027 BLAKE2B f2f3b3a33b2a50f3b4f97df16a948e5ed5e642f737de8e852da164aefd3ed9af7bbd0fc1de9f7c9dbee6b9b8ebe11e52af8cc79b8a130cff405fc1238afe217d SHA512 946cd1435a26673c851bdda170864d0c362dfc14d1a7087fbe6303ac79e1821e9c53b72e92d15ad7180b1d6ea3bcc0458e7bec37acc3e8b8bcca8efbb9ff2387 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 @@ -11,4 +12,5 @@ EBUILD llvm-libunwind-16.0.0.9999.ebuild 2978 BLAKE2B 9143fac20e5d73511c56e8015c EBUILD llvm-libunwind-16.0.0.ebuild 3045 BLAKE2B e0704cc1c6a743ecd3c073df9456f7a549896a9992083ee650803f199d4285a7666fc819245fe3e5762046d8df875291283059033287b9e1f9d71345e86a20a2 SHA512 4da2d464da0d7f438e782bbb539c394588c046af0c1415718ffa2e43e6500eaa60aedefe58b814281c41873a4ebae8b01f5299798583e9662a347a95ed5a5e69 EBUILD llvm-libunwind-17.0.0.9999.ebuild 2978 BLAKE2B 9143fac20e5d73511c56e8015c4758075bf62329b64428b9244812f2fe5fa32772c9ad29e3e7beb1aaa2ff3ef70ee69f9673c0becf7df09f4e2fc5d348c03512 SHA512 b790b15702e2ba0367c771d58dfe975f7b97bb6a90acca97d1180b1b3ba44893575bc92ee1cfe037c308b3191f3d1b8309a0a658cd8617b0993bfa8ce4630d97 EBUILD llvm-libunwind-17.0.0_pre20230314.ebuild 2978 BLAKE2B 9143fac20e5d73511c56e8015c4758075bf62329b64428b9244812f2fe5fa32772c9ad29e3e7beb1aaa2ff3ef70ee69f9673c0becf7df09f4e2fc5d348c03512 SHA512 b790b15702e2ba0367c771d58dfe975f7b97bb6a90acca97d1180b1b3ba44893575bc92ee1cfe037c308b3191f3d1b8309a0a658cd8617b0993bfa8ce4630d97 +EBUILD llvm-libunwind-17.0.0_pre20230325.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_pre20230325.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230325.ebuild new file mode 100644 index 000000000000..6ffa6c4f81b8 --- /dev/null +++ b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230325.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 +} -- cgit v1.2.3