summaryrefslogtreecommitdiff
path: root/sys-libs/compiler-rt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-08-01 22:03:23 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-08-01 22:03:23 +0100
commit590b9b7b03bf4651e099949e318755af7cfa81b8 (patch)
tree54c184b7d26c25f1922bfeaf19a1dd45a2e3b1eb /sys-libs/compiler-rt
parentf4fc10428424904caf2035cffc442195cb088b2c (diff)
gentoo resync : 01.08.2021
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/Manifest1
-rw-r--r--sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild124
2 files changed, 125 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index b0ff667694c6..6a73abf3dbb5 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -12,4 +12,5 @@ EBUILD compiler-rt-11.1.0.ebuild 3506 BLAKE2B fea54ca4aabe9bf35afc64a579ae18eb44
EBUILD compiler-rt-12.0.0.ebuild 3541 BLAKE2B 0d5581a8a0f45d6843d3aca9ff184bb447e886e7e41faee2e4ebebb2154cfb2138ffa04be73eb6f76c60f7bbd65a8589649c64c60612037221c646535f04b7b5 SHA512 fa67b1e4105f9aa3bfa95c95a24c8bfeade28c521d4c69b0c08d8e8c469a06d62eb3a2b8c97175806922bd319ece1e016437c693baaab50646ec650f7aecd46e
EBUILD compiler-rt-12.0.1.ebuild 3544 BLAKE2B b1841f87854a8fe106739b4248ef914219bc82c922a229fc6280ca2213e669bce4c64e06cc389bc3183f098afec0786492a3163d373a51a2664f586f7e700097 SHA512 2555664baf282d0d0e56cbb53c6824a196b4448e28c3c472e9d5f2c8cb114e12c0f1771219a8b62645a9cfbaf77ea8c80dd433b88a48d8a01922ad460e37cd26
EBUILD compiler-rt-13.0.0.9999.ebuild 3472 BLAKE2B f51cde79576ea3eca64225cc1c9dd85b3613409739593f1ac362282328b5801c5ebd79cea1bb09935b6e33e0bbb080b2a9f6be33b909b3af9ff18270dd4ee120 SHA512 0bce4326f3c704f1f56c3a54e8c53b3424500f1bf0d30cf63d6645bc05daf87dcc8c27c894746c5a14c8b9121ed952e87c3a1c08e8d5c263d1d2fc97d2d952cf
+EBUILD compiler-rt-14.0.0.9999.ebuild 3472 BLAKE2B f51cde79576ea3eca64225cc1c9dd85b3613409739593f1ac362282328b5801c5ebd79cea1bb09935b6e33e0bbb080b2a9f6be33b909b3af9ff18270dd4ee120 SHA512 0bce4326f3c704f1f56c3a54e8c53b3424500f1bf0d30cf63d6645bc05daf87dcc8c27c894746c5a14c8b9121ed952e87c3a1c08e8d5c263d1d2fc97d2d952cf
MISC metadata.xml 333 BLAKE2B fc411d2ccf9b848ed7ba71d6a1eb01c54237a38e3c612c22d39549f6b23ebc3179dd08c855852a72b9a4f4ae89418a078048702324df27b4fac11c36e80f846b SHA512 ca50c4e5ef7d52c167bca6a4ab2961a1f7f82d0e84722ec65b8ae44d0ff8a4a7db1dce630f6f18f7b526f77c432af7ebc9a29564659631bad1e3900b6f1df49b
diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild
new file mode 100644
index 000000000000..6f732cc60ab6
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-14.0.0.9999.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 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="$(ver_cut 1-3)"
+KEYWORDS=""
+IUSE="+clang test"
+RESTRICT="!test? ( test ) !clang? ( test )"
+
+CLANG_SLOT=${SLOT%%.*}
+# llvm-6 for new lit options
+DEPEND="
+ >=sys-devel/llvm-6"
+BDEPEND="
+ >=dev-util/cmake-3.16
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep ">=dev-python/lit-9.0.1[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
+ )
+ ${PYTHON_DEPS}"
+
+LLVM_COMPONENTS=( compiler-rt )
+LLVM_PATCHSET=9999-1
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ has_version "dev-python/lit[${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() {
+ # Darwin Prefix builds do not have llvm installed yet, so rely on
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead
+ # of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ local nolib_flags=( -nodefaultlibs -lc )
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ # ensure we can use clang before installing compiler-rt
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ elif ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ 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/${SLOT}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF
+ -DCOMPILER_RT_BUILD_PROFILE=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+
+ 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/${CLANG_SLOT}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake_build check-builtins
+}