diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-10-17 04:04:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-10-17 04:04:27 +0100 |
commit | 8796aaedb3257bbe4d80b0033408b2210b2259d6 (patch) | |
tree | 1ffee2ca4a87bd5dba43077259c000f9086fbfc8 /sys-libs/compiler-rt | |
parent | 61a1cada8ceb208845fa604b982216b0a7b099cb (diff) |
gentoo auto-resync : 17:10:2024 - 04:04:26
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r-- | sys-libs/compiler-rt/Manifest | 3 | ||||
-rw-r--r-- | sys-libs/compiler-rt/compiler-rt-19.1.2.ebuild | 174 |
2 files changed, 177 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest index 436ad6659a53..805e7cc24da3 100644 --- a/sys-libs/compiler-rt/Manifest +++ b/sys-libs/compiler-rt/Manifest @@ -11,6 +11,8 @@ DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffe DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b DIST llvm-project-19.1.1.src.tar.xz 141244648 BLAKE2B 7c9250f99c8e5ae2097e89269ebf5bfdfb0fba8f67ab934377d24030c985013fe5475d0c9bd6d60a679e169772ad1723bc6e44ff9e4c7aed5627b9f1f1a2477a SHA512 84adab40ffb9ec236dbf203d86c08a0c2c651f98278a9d0936490c7901159eb26eabd3db9316013886b549426d4acb43b75d866f7dc670ab299bf93ba35b1891 DIST llvm-project-19.1.1.src.tar.xz.sig 438 BLAKE2B 6967194abf6939291abc716f862a46ea7c5e195b98eebc26928a57dbd5034f82a8ecb5b7cc1b7c2428168309308b19df1c7db828703e80d3f7bf578e3542874d SHA512 07bb7bffb2b035417d702ca47be9d5759250f1a2cd57606855027d458ceb972a293b45d3d93bcda195588986acbb5eace60524f4aecdc0da7aeb3a8414c37c31 +DIST llvm-project-19.1.2.src.tar.xz 141241032 BLAKE2B 38a3f528ddae7cd738236a317551fdb94acd8fb736a57def15b75e1ed2f6572e1370fb3f1e4ff261d3cfb87df7d50d4db8fa9e70dc5e3dde617af09eb059fdd3 SHA512 e98ee405f5c30004b39f0de0470400dd2965adf4cda4b47a1d3792ae362ed43eb45e96a9b1689f31e1064e0b39252379270bd95bf8081cf9b92ecb9b371bf43b +DIST llvm-project-19.1.2.src.tar.xz.sig 438 BLAKE2B f5bc0cc43bc10ee2438289d62aa8169cbb9e0ea598381b4c744e6a09daf710650fbec0656a9ac7c0e6f84a0ff3541fe223fa9efc61fb3d4c496cad9df7b9edd4 SHA512 307cd88116e68f901229fc2f6db72bad5f964bacee178e2efad3419cec277b5a7e23fb347386fb4e83e1886551bbc78d187259518193cac7654573ee17e3cb63 DIST llvm-project-9aef0fd52a0b2bf31cf3bae8a0693d6df8db6e04.tar.gz 219987707 BLAKE2B a3f0acd0fd3b66c3a826ac6760653fa6ea893ffba7587cf4a14f472026a9d9d8bf6b63c26d8bc39e83936afe6b735496bd88ce6c00d16abe1d0ccd1f9a644302 SHA512 5104669d78930363afeba045dc27a4c36ca8bb7537d432c765e023cbd91155b248c3a60d4768e1f8690c88e82d4ff95a44fb73f26d25d6646dddc857992485ba DIST llvm-project-fb2960aad93f6c02e0ea8de0568c0aef8896eee8.tar.gz 219704020 BLAKE2B 91f7226d7c6dcfa82c6b892ec0a80b47b5abd435c39996d8a6e0611355d434a86eb42bd5dce849dcc9a2f0ed2ae9844e5672f45283984ad10c7c12c62c82d47b SHA512 f0b56a4ab532aaf4bb841aac4e2faf63f213f3cd71d24555b46805406502805e6cc46cb0aae0fbf5f49ddec99da801ab8e54410a9bd8a7bcb0e9fb13619c30bf EBUILD compiler-rt-15.0.7-r1.ebuild 4252 BLAKE2B 7270c3ae2a4a30b79774cd38041ee5e4381a0393be7768d56c2a59000a509e2b48336467d34ee09f8d82afbe9f453f79ddc17a2708746f89d2227b66cbfc6b01 SHA512 836e4cc58522c48d6fc40ca27efd68d18cca9914ce1810ab0b6d307bfa163b9d8b883729b917fb5ff129985ec86e5ba655587c3f93980f73e762e2bfd4ca2ab4 @@ -18,6 +20,7 @@ EBUILD compiler-rt-16.0.6-r5.ebuild 5235 BLAKE2B 7b246061a0f3de0f07d1610329d4a7a EBUILD compiler-rt-17.0.6-r1.ebuild 5232 BLAKE2B 5a0f7dfe903120235504687ae76593ce902caa8d7aab9a3e3ad09eaafcb49ab14b433c5825c52bd0533230606ed8c79dbb4e276ed2a5bd51e01a0499c8510dbe SHA512 539024f986c1c72eaa5b401af443209451a100830be73ec445e4ccc073b867e5e4806438ea779b05c5a81f544ae81baf9148adc9f3eb95d31511bc5f239b5631 EBUILD compiler-rt-18.1.8-r1.ebuild 4987 BLAKE2B e32d8c2e8ae1b978600444420dfb2e9329c85fad13e91cbf494167aa4e57f24bf538a4417d3b47d4b87234ae26b48d88d6efd1a9413587ac4488e3a007a9ddff SHA512 0e103e1bf304892e41ec4935d390f7d2e5cfcf569f2cf22b091524d8c73fcf60e07f96f3e8d71949226852ce61777bc4a309aa9063ab87830c3fb94bf8082001 EBUILD compiler-rt-19.1.1.ebuild 5086 BLAKE2B 73ce4892ff3df803dae4ff3f3b17ed89939521acd437b0a1953dee8321c10270ca5a89ebd0bfed6658cd669a7fb22b5ea142123fc8c6303cc4665f06646172cb SHA512 6c20f142a5d91899ad5b6aac0af1a0e07bfb57b2bcb1cd010977299401991165547f4105e23d850fc038eaea053b035c578406828a35a2bac97481d21fed7154 +EBUILD compiler-rt-19.1.2.ebuild 5086 BLAKE2B 73ce4892ff3df803dae4ff3f3b17ed89939521acd437b0a1953dee8321c10270ca5a89ebd0bfed6658cd669a7fb22b5ea142123fc8c6303cc4665f06646172cb SHA512 6c20f142a5d91899ad5b6aac0af1a0e07bfb57b2bcb1cd010977299401991165547f4105e23d850fc038eaea053b035c578406828a35a2bac97481d21fed7154 EBUILD compiler-rt-20.0.0.9999.ebuild 4977 BLAKE2B 4a8175408e7946c688c362e4df75ea733260807de4f0bdbc371c0aaccda328e0ceae0be106b2a6cf233e1541e81b03670387940d8822121d81d11f2cf71e6be5 SHA512 5fae782e62cd6234b9d637e379299d869df2b7641f52919ee52750d92eb02a1027a13be827ed53caac33f08c111174f803cd199645aab90fda77e8710977e71b EBUILD compiler-rt-20.0.0_pre20241009.ebuild 4977 BLAKE2B 4a8175408e7946c688c362e4df75ea733260807de4f0bdbc371c0aaccda328e0ceae0be106b2a6cf233e1541e81b03670387940d8822121d81d11f2cf71e6be5 SHA512 5fae782e62cd6234b9d637e379299d869df2b7641f52919ee52750d92eb02a1027a13be827ed53caac33f08c111174f803cd199645aab90fda77e8710977e71b EBUILD compiler-rt-20.0.0_pre20241015.ebuild 4977 BLAKE2B 4a8175408e7946c688c362e4df75ea733260807de4f0bdbc371c0aaccda328e0ceae0be106b2a6cf233e1541e81b03670387940d8822121d81d11f2cf71e6be5 SHA512 5fae782e62cd6234b9d637e379299d869df2b7641f52919ee52750d92eb02a1027a13be827ed53caac33f08c111174f803cd199645aab90fda77e8710977e71b diff --git a/sys-libs/compiler-rt/compiler-rt-19.1.2.ebuild b/sys-libs/compiler-rt/compiler-rt-19.1.2.ebuild new file mode 100644 index 000000000000..952d4bf6f6d6 --- /dev/null +++ b/sys-libs/compiler-rt/compiler-rt-19.1.2.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit cmake crossdev flag-o-matic llvm.org llvm-utils python-any-r1 +inherit 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="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +IUSE="+abi_x86_32 abi_x86_64 +clang debug test" +RESTRICT="!test? ( test ) !clang? ( test )" + +DEPEND=" + sys-devel/llvm:${LLVM_MAJOR} +" +BDEPEND=" + clang? ( sys-devel/clang:${LLVM_MAJOR} ) + 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_TEST_COMPONENTS=( llvm/include/llvm/TargetParser ) +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() { + if target_is_not_host || tc-is-cross-compiler ; then + # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures + CHOST=${CTARGET} strip-unsupported-flags + # overrides host docs otherwise + DOCS=() + fi + python-any-r1_pkg_setup +} + +test_compiler() { + target_is_not_host && return + $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ + <<<'int main() { return 0; }' &>/dev/null +} + +src_configure() { + llvm_prepend_path "${LLVM_MAJOR}" + + # 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 && ! is_crosspkg; 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 ! is_crosspkg && ! 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 -e main ) + + 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_CTX_PROFILE=OFF + -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 && ! target_is_not_host; then + mycmakeargs+=( + -DCAN_TARGET_i386=$(usex abi_x86_32) + -DCAN_TARGET_x86_64=$(usex abi_x86_64) + ) + fi + + if is_crosspkg; then + # Needed to target built libc headers + export CFLAGS="${CFLAGS} -isystem /usr/${CTARGET}/usr/include" + mycmakeargs+=( + # Without this, the compiler will compile a test program + # and fail due to no builtins. + -DCMAKE_C_COMPILER_WORKS=1 + -DCMAKE_CXX_COMPILER_WORKS=1 + + # Without this, compiler-rt install location is not unique + # to target triples, only to architecture. + # Needed if you want to target multiple libcs for one arch. + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON + + -DCMAKE_ASM_COMPILER_TARGET="${CTARGET}" + -DCMAKE_C_COMPILER_TARGET="${CTARGET}" + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON + ) + 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 +} |