Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/
Date: Fri, 01 Dec 2017 23:41:01
Message-Id: 1512171635.6c2134d094ba00fa30576831cad3299ced65d4ff.mgorny@gentoo
1 commit: 6c2134d094ba00fa30576831cad3299ced65d4ff
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 1 10:39:25 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 1 23:40:35 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c2134d0
7
8 sys-libs/compiler-rt: Bump to 5.0.1
9
10 sys-libs/compiler-rt/Manifest | 1 +
11 sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild | 97 +++++++++++++++++++++++
12 2 files changed, 98 insertions(+)
13
14 diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
15 index d03d168bb4d..ff880467dc3 100644
16 --- a/sys-libs/compiler-rt/Manifest
17 +++ b/sys-libs/compiler-rt/Manifest
18 @@ -1,2 +1,3 @@
19 DIST compiler-rt-4.0.1.src.tar.xz 1434100 SHA256 a3c87794334887b93b7a766c507244a7cdcce1d48b2e9249fc9a94f2c3beb440 SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649 WHIRLPOOL 8b33c6841cacefe98da92435418b13b8f8ed97a982903be827e5c37f937dc9001975d6a709d60423b21509dd5670ee2e90cb34c96473fb4a66c2ab6f47af09e5
20 DIST compiler-rt-5.0.0.src.tar.xz 1507996 SHA256 d5ad5266462134a482b381f1f8115b6cad3473741b3bb7d1acc7f69fd0f0c0b3 SHA512 5f3fd49736fba35232b0baa19a5f03c4ab3bf85ec16f23355eb3c516fe6d861c14272c224ca2f2092a80636df4307e49a3df1b60a3791949b3f1ba4a0c8c81fb WHIRLPOOL 7ac0eb36b59a7917b694e4b5e9a425a3ffed7c48eda0c211a7d1c52596b2d39fa4bc0a84db5f58492bf7b5b64c22b81cd2fcd8dee2bceb89583b6e190c70d2d8
21 +DIST compiler-rt-5.0.1rc2.src.tar.xz 1509784 BLAKE2B 898e32e189589b6b72073cb791dc9498201d7267e13ad60704b9a66f3e4e839497a84c7cfc5817e72263b5287d00cf25debd2e739ea4174213c56ddb2aed6e38 SHA512 ec2a91e81bc7ac069849f07c31335c88734fd34b512ca3bedaed9c33116549853ac6ac7188552c181900ed8d7ff14ec08c004c87d7fbcbc234e73710c2047d2b
22
23 diff --git a/sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild b/sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild
24 new file mode 100644
25 index 00000000000..f0801a9eab4
26 --- /dev/null
27 +++ b/sys-libs/compiler-rt/compiler-rt-5.0.1_rc2.ebuild
28 @@ -0,0 +1,97 @@
29 +# Copyright 1999-2017 Gentoo Foundation
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI=6
33 +
34 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
35 +# (needed due to CMAKE_BUILD_TYPE != Gentoo)
36 +CMAKE_MIN_VERSION=3.7.0-r1
37 +PYTHON_COMPAT=( python2_7 )
38 +
39 +inherit cmake-utils flag-o-matic llvm python-any-r1 toolchain-funcs
40 +
41 +DESCRIPTION="Compiler runtime library for clang (built-in part)"
42 +HOMEPAGE="https://llvm.org/"
43 +SRC_URI="http://prereleases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
44 +
45 +LICENSE="|| ( UoI-NCSA MIT )"
46 +SLOT="${PV%_*}"
47 +KEYWORDS=""
48 +IUSE="+clang test"
49 +
50 +LLVM_SLOT=${SLOT%%.*}
51 +# llvm-4 needed for --cmakedir
52 +DEPEND="
53 + >=sys-devel/llvm-4
54 + clang? ( sys-devel/clang )
55 + test? (
56 + $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
57 + =sys-devel/clang-${PV%_*}*:${LLVM_SLOT} )
58 + ${PYTHON_DEPS}"
59 +
60 +S=${WORKDIR}/${P/_/}.src
61 +
62 +# least intrusive of all
63 +CMAKE_BUILD_TYPE=RelWithDebInfo
64 +
65 +pkg_pretend() {
66 + if ! use clang && ! tc-is-clang; then
67 + ewarn "Building using a compiler other than clang may result in broken atomics"
68 + ewarn "library. Enable USE=clang unless you have a very good reason not to."
69 + fi
70 +}
71 +
72 +pkg_setup() {
73 + llvm_pkg_setup
74 + python-any-r1_pkg_setup
75 +}
76 +
77 +test_compiler() {
78 + $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
79 + <<<'int main() { return 0; }' &>/dev/null
80 +}
81 +
82 +src_configure() {
83 + # pre-set since we need to pass it to cmake
84 + BUILD_DIR=${WORKDIR}/${P}_build
85 +
86 + local nolib_flags=( -nodefaultlibs -lc )
87 + if use clang; then
88 + local -x CC=${CHOST}-clang
89 + local -x CXX=${CHOST}-clang++
90 + # ensure we can use clang before installing compiler-rt
91 + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
92 + strip-unsupported-flags
93 + elif ! test_compiler; then
94 + if test_compiler "${nolib_flags[@]}"; then
95 + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
96 + ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
97 + fi
98 + fi
99 +
100 + local mycmakeargs=(
101 + -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
102 +
103 + -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
104 + -DCOMPILER_RT_BUILD_SANITIZERS=OFF
105 + -DCOMPILER_RT_BUILD_XRAY=OFF
106 + )
107 +
108 + if use test; then
109 + mycmakeargs+=(
110 + -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
111 +
112 + -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang"
113 + -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_SLOT}/bin/clang++"
114 + )
115 + fi
116 +
117 + cmake-utils_src_configure
118 +}
119 +
120 +src_test() {
121 + # respect TMPDIR!
122 + local -x LIT_PRESERVES_TMP=1
123 +
124 + cmake-utils_src_make check-builtins
125 +}