summaryrefslogtreecommitdiff
path: root/llvm-runtimes/compiler-rt
diff options
context:
space:
mode:
Diffstat (limited to 'llvm-runtimes/compiler-rt')
-rw-r--r--llvm-runtimes/compiler-rt/Manifest2
-rw-r--r--llvm-runtimes/compiler-rt/compiler-rt-20.0.0_pre20241215.ebuild175
2 files changed, 177 insertions, 0 deletions
diff --git a/llvm-runtimes/compiler-rt/Manifest b/llvm-runtimes/compiler-rt/Manifest
index 8b41858bb213..b3fa60afdd73 100644
--- a/llvm-runtimes/compiler-rt/Manifest
+++ b/llvm-runtimes/compiler-rt/Manifest
@@ -14,6 +14,7 @@ DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e2
DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
+DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a
EBUILD compiler-rt-15.0.7-r1.ebuild 4252 BLAKE2B 39ed1e06453690d129552fcca79b7df77345d0a4f21d477521cd7638f492450abc7fed895471709dc3acc7f7944a2df9d89668c47bf48c6f5e9d9ab27440eea0 SHA512 9fe7a91466b8903d68009d39ce13282f2e661211f4b70bc2830119018bccf3f15c894488734451054f15e64cd258e9f517d5aa01432d5ba253f58660f4f79899
EBUILD compiler-rt-15.0.7-r2.ebuild 4380 BLAKE2B b60b82c22641657d9bc56d1dca2d357757b1512f4f738f5f1c3f31456328350a778951e18ae756d375227f1e6bfff77ce2a8932a0064884b2d2854de0e31b60c SHA512 803c77378d9fc5b40c5ef65b55e9b3fd311bb9ba6473edefe4ffc88bcc6f79fbca656a63fcfd89a8c425b72c0e0683963ae4ff6399720ebdd6f260ccb3b6891e
EBUILD compiler-rt-16.0.6-r5.ebuild 5235 BLAKE2B 900d4aa376cdab2444290f20036abc8ff6f71da93ba84b48e3b6a5edc16737fafc92dc9b114b100718ae8599e2754810c6502ce1fbd9061163eeddc3b02fb836 SHA512 5ad35070fdbf7623d1990bb0c53d72e9dce27e57466429785cec41079f26db73220e26e9281625ae9288d4033e863a8e5e6e73110cbf3e2d3e70ef1deb30574a
@@ -26,4 +27,5 @@ EBUILD compiler-rt-19.1.4.ebuild 5204 BLAKE2B ab807058256aa80374f77c5a0141f5a0dc
EBUILD compiler-rt-19.1.5.ebuild 5209 BLAKE2B 8d754cd636d4550b5b98c070ea72f99f4da7e357c24ef58ea60c1b0553fb452657c95a8eabf3147a6fc8c41f8befd87c25bdbabce9b870d58ca7dc9dff09b807 SHA512 8964c49d1cefc0c8bbab17d569090084958b5910ef579b1538dfe2d9507d5d0fcebd02c6bdaad14e27a5e222acafa1eaa2cd3572aebd9db65e477d6032149d05
EBUILD compiler-rt-20.0.0.9999.ebuild 5100 BLAKE2B c96f7e85cfe30d5e899bf251631a997c3e9c995184f74a8e797872a6c8444c4859e6e6b2897f903b3254f3eba335cf12b512f841407dad2d4a5f33b0a9903883 SHA512 811365cf104075f395953e02e03f70e32b26b6106037d7115cf4ceed50370d63f48239c186c359aa3c5a2ee1bd0fa2fb9466bfb0277014fa2a3f4417649f07ba
EBUILD compiler-rt-20.0.0_pre20241207.ebuild 5100 BLAKE2B c96f7e85cfe30d5e899bf251631a997c3e9c995184f74a8e797872a6c8444c4859e6e6b2897f903b3254f3eba335cf12b512f841407dad2d4a5f33b0a9903883 SHA512 811365cf104075f395953e02e03f70e32b26b6106037d7115cf4ceed50370d63f48239c186c359aa3c5a2ee1bd0fa2fb9466bfb0277014fa2a3f4417649f07ba
+EBUILD compiler-rt-20.0.0_pre20241215.ebuild 5100 BLAKE2B c96f7e85cfe30d5e899bf251631a997c3e9c995184f74a8e797872a6c8444c4859e6e6b2897f903b3254f3eba335cf12b512f841407dad2d4a5f33b0a9903883 SHA512 811365cf104075f395953e02e03f70e32b26b6106037d7115cf4ceed50370d63f48239c186c359aa3c5a2ee1bd0fa2fb9466bfb0277014fa2a3f4417649f07ba
MISC metadata.xml 610 BLAKE2B 2fd2530da10ecae7d8b54b448d0e0ec082b8082e3b5da8ab47dc79058724b368d5f900b1de18e14fe2c2b95257c69d0aceb9bd83b8b6873f65935302461ac263 SHA512 d50a05439376fa985ab1579a592cc6f544552e177132dc8773f172b827dec49ab3f8bcd77d89c25d4f2a1b99492897045b16a75ceb2d14cc76187140c33ccc45
diff --git a/llvm-runtimes/compiler-rt/compiler-rt-20.0.0_pre20241215.ebuild b/llvm-runtimes/compiler-rt/compiler-rt-20.0.0_pre20241215.ebuild
new file mode 100644
index 000000000000..7971b744756d
--- /dev/null
+++ b/llvm-runtimes/compiler-rt/compiler-rt-20.0.0_pre20241215.ebuild
@@ -0,0 +1,175 @@
+# 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}"
+IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang +debug test"
+REQUIRED_USE="atomic-builtins? ( clang )"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+DEPEND="
+ llvm-core/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+ clang? ( llvm-core/clang:${LLVM_MAJOR} )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+ =llvm-core/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_EXCLUDE_ATOMIC_BUILTIN=$(usex !atomic-builtins)
+ -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
+}