summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-20 00:02:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-20 00:02:16 +0100
commit77b275a53383b07b154caa09feb6f4961b206638 (patch)
treebf2b88f1f848dfe69541c3d78aaa35ef22560107 /sys-libs/compiler-rt
parent9d4810f84de876ec9d0ae03d0d44224500b41188 (diff)
gentoo auto-resync : 20:05:2024 - 00:02:15
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/Manifest3
-rw-r--r--sys-libs/compiler-rt/compiler-rt-18.1.6.ebuild172
2 files changed, 175 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 6f30b2465357..904580047377 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -9,6 +9,8 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541
DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B bfdd987d5992a4d94ae8b14792df3be67a8e8fdf1daef9834cdaa2132df1b7ddb72ba0aabbb34b171a73d0f3b2b0f61e7160f0b278a67fd4850e3f501fd21531 SHA512 9e2f1e251b3754a24a0b39676d78c98692887c05c85cf0bee50fd44d9635290019930d4dabd1ff4ba3c9c1067e7e0e09aa1bbcd3d76687f919a1d44ba85eee20
DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9 SHA512 3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237
+DIST llvm-project-18.1.6.src.tar.xz 132064976 BLAKE2B d38d8026068de371dc4bc288c68c8e441a126cf8e89e55a965f3b9e3a629a37d5743fd7859a60bedaddf27ff2da1e0f08c81806871ef542cb7c3f40b23b22cf5 SHA512 89ec276aa41bb2d76cfc3a72d8e728a9ce9176e02c085338b704790524fe329904cf311381805814faa8a6c79637620c01627bf122a51f89e0f3adb47e5df34c
+DIST llvm-project-18.1.6.src.tar.xz.sig 566 BLAKE2B 4b4a1ec2f084b0728134b9c04775db5938e571f1d7c7aa45b985bed490dcfd2cceab2069a43d4ce7766faec703310a376b83565af317e5f60bf10bc06a732395 SHA512 fbae037d39f4f1c13babafd42dee719f3d79f0e2142cc319f59fb319361a1db8ce65fa736a0e2a5e702ac49e3b8323374be6cfa1003f96b0887fa1894e2b6dee
DIST llvm-project-702198fc9ac5dba392f9d9ba7c56467996343c0a.tar.gz 211764675 BLAKE2B b28203faf5c4e51236da3e3abac969cffe6f93ce6757a81b5a577187ec236fc0b124fe6a370d1f4e803deab781606a7caf0b411780cc84ee08a8de942c4fc479 SHA512 b4217403abf4166eb8eccfd304bcaa2e15d5b67c4f996d51e0745d197e4b9eda1dd5a5b1d7c384effc25f53bb1229edda9618e172abe3be1a94a9569f7c5b0b7
DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 BLAKE2B 28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11 SHA512 1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417
EBUILD compiler-rt-15.0.7.ebuild 4238 BLAKE2B 22d56dbe24c92400bf58942390b06af70fddba89d8fecc9b85162dd7a41c6ee592eaaf883f5ad483f65f74fabccc28f94528688410ee36e2d5279efcc6066de0 SHA512 ca49d23def580d4dcfc4058768eeb9deb6e59ea44575da272d1c142fffe0bf4e3d3c7c9fa6182ab348a3aab11879af116a549cb1a3a03b27b4bf4151cf892aaa
@@ -16,6 +18,7 @@ EBUILD compiler-rt-16.0.6-r4.ebuild 5226 BLAKE2B 7d2d76d79ce49f3d175de87fa982439
EBUILD compiler-rt-16.0.6.ebuild 5198 BLAKE2B 2fe2310703d44d330d97b1fa1b407d99898070604037be31ca762fe65043e1d3d1e046298dc74f3d0cbb3493f985661e362b217170cbe1bf74a47dddfe8987ca SHA512 cc9aabc22f689bfc677ceb74793441674aeca2586a28ff96b812af4822d1b8b5a4147484e41f0bf95ae995488d3e8ee77684fd684b9dab8ade4f1fa57e80c709
EBUILD compiler-rt-17.0.6.ebuild 5218 BLAKE2B 3f488320228fd2a3d1caed790e8e21c7c363769c4d8b912fd5a964b4e802e1b58b297336c527b451edb74ff42c4bdd236795210c4f225ca98a6980fed95d6771 SHA512 abbe2f679a1af7c012ecae32b57b244f7ad84a5d44151a4b7ad799524061f8b65504bd6aa169a91d1a16b878845f40b47e4a1f0253a3ff9ccbe8dbb736db1fb1
EBUILD compiler-rt-18.1.5.ebuild 4972 BLAKE2B 57c3b46220e996bb5f4bf22b557b6891a311ba6995ba5e0b59dc1f6913a704a6f44e27d89eeb8fc88ce22dc38b4b16ee8efead72e2728d31088d487619625148 SHA512 024629f4752e45677c96ab0f367ef02f6b64b0229fc6bca991d698fef2a2e4d196cb2e51293562e838d14b605cf784e0bf99e69c7b48877c06c562e8bc70ab37
+EBUILD compiler-rt-18.1.6.ebuild 4972 BLAKE2B 57c3b46220e996bb5f4bf22b557b6891a311ba6995ba5e0b59dc1f6913a704a6f44e27d89eeb8fc88ce22dc38b4b16ee8efead72e2728d31088d487619625148 SHA512 024629f4752e45677c96ab0f367ef02f6b64b0229fc6bca991d698fef2a2e4d196cb2e51293562e838d14b605cf784e0bf99e69c7b48877c06c562e8bc70ab37
EBUILD compiler-rt-19.0.0.9999.ebuild 4907 BLAKE2B fc7c7f546021b87d3ddfc7ece44df1b743df77044c5537f73530f612f17ee0db1281733066c22510c5fe7caba2d493d6ec2753ab7256875068f412f7eca586c4 SHA512 5bba47a9926a8cc5efa7e1d82573feed2b8d97c15e1dd0064bb85398723011f173352e89af88176aa6eab81cbef2d4d7dca54dc64afd1a4673a4b233775299a2
EBUILD compiler-rt-19.0.0_pre20240509.ebuild 4907 BLAKE2B fc7c7f546021b87d3ddfc7ece44df1b743df77044c5537f73530f612f17ee0db1281733066c22510c5fe7caba2d493d6ec2753ab7256875068f412f7eca586c4 SHA512 5bba47a9926a8cc5efa7e1d82573feed2b8d97c15e1dd0064bb85398723011f173352e89af88176aa6eab81cbef2d4d7dca54dc64afd1a4673a4b233775299a2
EBUILD compiler-rt-19.0.0_pre20240518.ebuild 4907 BLAKE2B fc7c7f546021b87d3ddfc7ece44df1b743df77044c5537f73530f612f17ee0db1281733066c22510c5fe7caba2d493d6ec2753ab7256875068f412f7eca586c4 SHA512 5bba47a9926a8cc5efa7e1d82573feed2b8d97c15e1dd0064bb85398723011f173352e89af88176aa6eab81cbef2d4d7dca54dc64afd1a4673a4b233775299a2
diff --git a/sys-libs/compiler-rt/compiler-rt-18.1.6.ebuild b/sys-libs/compiler-rt/compiler-rt-18.1.6.ebuild
new file mode 100644
index 000000000000..2a724ca7dd8c
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-18.1.6.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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 ~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 )
+ 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() {
+ 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_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
+}