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-21.0.0_pre20250311.ebuild175
2 files changed, 177 insertions, 0 deletions
diff --git a/llvm-runtimes/compiler-rt/Manifest b/llvm-runtimes/compiler-rt/Manifest
index 3eddee0709e2..feb594532390 100644
--- a/llvm-runtimes/compiler-rt/Manifest
+++ b/llvm-runtimes/compiler-rt/Manifest
@@ -16,6 +16,7 @@ DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf
DIST llvm-project-20.1.0.src.tar.xz 147206476 BLAKE2B 8e8bd8aa995a84d17ac7d634098a6b72a47c30f1752029b620f4541a2de4039edf09117286094ae7bc59c4e84374dcffb8e5ee6ef5feaf4ea7ddb58dd04ea803 SHA512 c90fbc43c40e148357912adc40d799a79cce3d3a929136c137421f6342ed7338659e651f1dedfa8e10b94b9f2897e25b2962e17709add02857f89f10615a2397
DIST llvm-project-20.1.0.src.tar.xz.sig 566 BLAKE2B 98979ce89f3fe6e95eef6096066cf855245a585608e7d1fddb5bbb2c73077f3ee28204260e18d7e45e3051daae3639520c39bc3d0dc51524873ac213e2511456 SHA512 68da1c2a13aaa48a67bbb9e716f9f030cf372edc651bca2861453378a6a9172a207ff59e29b175001f042888bf1f9c118fbf938f757e1f4c966943baa7e2696a
DIST llvm-project-7e8a06cfa4a2951b8ee77e19e34926e6e535b4d1.tar.gz 228792296 BLAKE2B cd9357bdca9342770820f9fadfbd0b129a83324847f18e2ebac1fed8df4afb101aba2dc19d90264ae1e2d5692e34149ca24ef82a4973e7aeddb157268bb411b6 SHA512 9821a34a559e1db596940d76ce9388360baea43c1a9de814f567bfcf1428a0c6e3ced61b1e07537058454785d9c3aa3f443cbcf742a01fb40dd20b476a906442
+DIST llvm-project-cb7298f66d62a3548fcf3bd230304067ecf30d17.tar.gz 229200711 BLAKE2B 1910569812e7423cf566b0dec67269404ba8db8232ab293bc603a88914f2b756e3088bf2133c0fca612cc58d39691c7b813b3c5839a7ac9a3d177fe6bde766c6 SHA512 07c3f6ce34e7d32c5ebce1d2efb77e6a1dde49f9eedf7191733a20bdcb6ffd0c03f8fc8de85fd00bd9465b209f140639a68a367d2218c028bfa6e06067cc3e14
EBUILD compiler-rt-15.0.7-r1.ebuild 4254 BLAKE2B d6906f4248fbefb271b191a41e670edc186720c591f2d2428a22c9d65fe3b5babd37ba8b7e01dd7a7f83ad3dc7f9026ba66c142f6ea194b94556d91c7991a6a7 SHA512 f3ef7006028553df8397596f3f71b16386a33885e03471e03aabc3c1a9fc0a64dd2f00de50689b69c581185761aae9040142a5a1d1c8b22dbbe4b6c282f6d1bd
EBUILD compiler-rt-15.0.7-r2.ebuild 4382 BLAKE2B 9f19adfb4ae5327b72756dc5427a6dc77172c7094c185b73e2f75f9b35fbf7e0188f45989168f0f50acd66ecc9844fbd1d024c79691ab111e0471aaef7b39c09 SHA512 e8281c1fe92852ac5692c1e6fea5df14a37eed236d357686e19c8abb65811c64be30dc63a8285b3b3f6c7ba4d2e348be2108c7bd5e10a3216ff7884d7311fa95
EBUILD compiler-rt-16.0.6-r5.ebuild 5237 BLAKE2B a6001433372d0b63067d598e791b96e1b1389bb86b12dc696ffa8f06372641b388d5aaa11fc23f165bd12372804961019331d20564d547c3b0b2ed261c069cd7 SHA512 86d3c0f9dcb5f5c9f88d2af4fc5e8184e7eb9d77e6a5587940ddf3def98e58dc8603e50fe763161bcced08e50e8d9bc43d6fa3380124a855ea5280abdcb04edc
@@ -29,4 +30,5 @@ EBUILD compiler-rt-19.1.7.ebuild 5208 BLAKE2B 0b704d6d8a98b94ed9dcbb687b75004577
EBUILD compiler-rt-20.1.0.ebuild 5211 BLAKE2B 277f14859e6f2ad981ab7fd579b2c15f9e169121695772639420ee0f6a2861557ff4d5b3370373ceb207125bee131fe9d15705e7e8073eac8a4ffcbc794cdfe1 SHA512 a97f07053316325b71102bcfcd6dba613e6405b6a2f482bf97e7443bb3ed694bf709df97cc0cb04ca772353ccf459b2b07a15039a547e4ed7324177d0de1f777
EBUILD compiler-rt-21.0.0.9999.ebuild 5102 BLAKE2B ea80116593a143e78f765446d3f9bd4e1d5d0cbbd8134100cea9b801a8a5ce27fcb88775840eb1177d67eec764dfbf22b7a142e71427b9890aa57ae312c1ffaf SHA512 134bdd39f6cb56f5a018e77b3de124ca897e12ca7190e54bb4a855001917cbc864eb49703b6151459677cee95890c2fbe0f223b0422b61f3c9bbbf5f923a2dd5
EBUILD compiler-rt-21.0.0_pre20250301.ebuild 5102 BLAKE2B ea80116593a143e78f765446d3f9bd4e1d5d0cbbd8134100cea9b801a8a5ce27fcb88775840eb1177d67eec764dfbf22b7a142e71427b9890aa57ae312c1ffaf SHA512 134bdd39f6cb56f5a018e77b3de124ca897e12ca7190e54bb4a855001917cbc864eb49703b6151459677cee95890c2fbe0f223b0422b61f3c9bbbf5f923a2dd5
+EBUILD compiler-rt-21.0.0_pre20250311.ebuild 5102 BLAKE2B ea80116593a143e78f765446d3f9bd4e1d5d0cbbd8134100cea9b801a8a5ce27fcb88775840eb1177d67eec764dfbf22b7a142e71427b9890aa57ae312c1ffaf SHA512 134bdd39f6cb56f5a018e77b3de124ca897e12ca7190e54bb4a855001917cbc864eb49703b6151459677cee95890c2fbe0f223b0422b61f3c9bbbf5f923a2dd5
MISC metadata.xml 610 BLAKE2B 2fd2530da10ecae7d8b54b448d0e0ec082b8082e3b5da8ab47dc79058724b368d5f900b1de18e14fe2c2b95257c69d0aceb9bd83b8b6873f65935302461ac263 SHA512 d50a05439376fa985ab1579a592cc6f544552e177132dc8773f172b827dec49ab3f8bcd77d89c25d4f2a1b99492897045b16a75ceb2d14cc76187140c33ccc45
diff --git a/llvm-runtimes/compiler-rt/compiler-rt-21.0.0_pre20250311.ebuild b/llvm-runtimes/compiler-rt/compiler-rt-21.0.0_pre20250311.ebuild
new file mode 100644
index 000000000000..812a99f9d2a6
--- /dev/null
+++ b/llvm-runtimes/compiler-rt/compiler-rt-21.0.0_pre20250311.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2025 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
+}