summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-08 02:07:29 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-08 02:07:29 +0000
commit494168b06b81a32b889c3cb1f721f925d0a6824f (patch)
tree0ec763ffa61af808a83f365fb6680258d2e28a50 /sys-libs/compiler-rt
parent2198f8593ae0312add1bdccb49edfcb935e5f8a6 (diff)
gentoo auto-resync : 08:12:2024 - 02:07:28
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/Manifest2
-rw-r--r--sys-libs/compiler-rt/compiler-rt-20.0.0_pre20241207.ebuild175
2 files changed, 177 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index adb348bdde13..d3bcdddeba03 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -13,6 +13,7 @@ DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d22
DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
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-a348f223cab54b21a7b1c38dec7bc6aa2f81c949.tar.gz 223630067 BLAKE2B 3c2121a8d13e3a84a9ee98d17c58e5fd5a31d5870ac21c633c78c49b4af0c401310f7e91f64ff3b7cf7f6e8d205c730458b8b1101b1255f422659974d48e2ecb SHA512 33cc09a904e4fe0d529611a1d71d764e6d49f014cea903aadc0755d0420f65cfc763fdcfd4bb9a96adad79ce1c4475d8c005dcac37c4fe130a1fb3665172f1db
EBUILD compiler-rt-15.0.7-r1.ebuild 4252 BLAKE2B 7270c3ae2a4a30b79774cd38041ee5e4381a0393be7768d56c2a59000a509e2b48336467d34ee09f8d82afbe9f453f79ddc17a2708746f89d2227b66cbfc6b01 SHA512 836e4cc58522c48d6fc40ca27efd68d18cca9914ce1810ab0b6d307bfa163b9d8b883729b917fb5ff129985ec86e5ba655587c3f93980f73e762e2bfd4ca2ab4
EBUILD compiler-rt-15.0.7-r2.ebuild 4380 BLAKE2B efee8f45c42790e54595f7423c6c18c33c769f83d3150ffab68328aac1ba90cbb1b59c046e11545cb685dacec8ab9d30b0eb48a1a4791cf53940fc5ca9891d20 SHA512 6d4ab7e49822b975056a8554f2cba98b6ff794dbbb82ec67a30e761ee2e32427223d7afd27f42b17c4a62c8a44d4db3c92b662ed09d7c73a38fb150479d7cca9
@@ -26,4 +27,5 @@ EBUILD compiler-rt-19.1.4.ebuild 5204 BLAKE2B d589324b86c735d3b4ab8a654037c8af6b
EBUILD compiler-rt-19.1.5.ebuild 5209 BLAKE2B d69ba529020b23d4a7f00195d2ea7a3010976271a69b4a5229d7fbc944f129480874ec9e8ca3b68f3a938d790c112d2cd2aa77eb560ab821eb3f79dcb028b71b SHA512 92c74ab12577049d145a3f078d72fa59dcda40fde713ff1079dc065c50fd48d29b30dd58052bb2182bc01146485134c694eb332196d415f8967b38de2ad74301
EBUILD compiler-rt-20.0.0.9999.ebuild 5100 BLAKE2B 8b21c012e5424c96d3957670edfa06a03ed3a5a328b1600c29d471ba12191b319d39e0124d276fbd4ebaef9bea3f1a2133c9fd391f22328a46b008e9c783e5cb SHA512 cd3d927fb0ad5a5f919bcc7143f07e1f32870ab7ff278503c3b73a90f1d685e9b4b657d364ddd9c20f3dd2b03d370bb791f1a5e5f1314e9b592b00df41557360
EBUILD compiler-rt-20.0.0_pre20241130.ebuild 5100 BLAKE2B 8b21c012e5424c96d3957670edfa06a03ed3a5a328b1600c29d471ba12191b319d39e0124d276fbd4ebaef9bea3f1a2133c9fd391f22328a46b008e9c783e5cb SHA512 cd3d927fb0ad5a5f919bcc7143f07e1f32870ab7ff278503c3b73a90f1d685e9b4b657d364ddd9c20f3dd2b03d370bb791f1a5e5f1314e9b592b00df41557360
+EBUILD compiler-rt-20.0.0_pre20241207.ebuild 5100 BLAKE2B 8b21c012e5424c96d3957670edfa06a03ed3a5a328b1600c29d471ba12191b319d39e0124d276fbd4ebaef9bea3f1a2133c9fd391f22328a46b008e9c783e5cb SHA512 cd3d927fb0ad5a5f919bcc7143f07e1f32870ab7ff278503c3b73a90f1d685e9b4b657d364ddd9c20f3dd2b03d370bb791f1a5e5f1314e9b592b00df41557360
MISC metadata.xml 610 BLAKE2B 2fd2530da10ecae7d8b54b448d0e0ec082b8082e3b5da8ab47dc79058724b368d5f900b1de18e14fe2c2b95257c69d0aceb9bd83b8b6873f65935302461ac263 SHA512 d50a05439376fa985ab1579a592cc6f544552e177132dc8773f172b827dec49ab3f8bcd77d89c25d4f2a1b99492897045b16a75ceb2d14cc76187140c33ccc45
diff --git a/sys-libs/compiler-rt/compiler-rt-20.0.0_pre20241207.ebuild b/sys-libs/compiler-rt/compiler-rt-20.0.0_pre20241207.ebuild
new file mode 100644
index 000000000000..92b6059c1ee7
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-20.0.0_pre20241207.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="
+ 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_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
+}