1 |
commit: 9ad847baef4b6650d8020ce82914b9bacd05fd1f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 30 08:37:31 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 14:52:07 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ad847ba |
7 |
|
8 |
sys-libs/compiler-rt: Add 16.0.0_pre20220930 snapshot |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/compiler-rt/Manifest | 1 + |
13 |
.../compiler-rt-16.0.0_pre20220930.ebuild | 151 +++++++++++++++++++++ |
14 |
2 files changed, 152 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest |
17 |
index 1a118d537cb0..bb38ad11c159 100644 |
18 |
--- a/sys-libs/compiler-rt/Manifest |
19 |
+++ b/sys-libs/compiler-rt/Manifest |
20 |
@@ -6,5 +6,6 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f |
21 |
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 |
22 |
DIST llvm-project-15.0.1.src.tar.xz 112068688 BLAKE2B 8fd6690445f7cbc8b47a7c1dd1f2c4fbc39f9a97f9d4a0015d466726454b090b0d1ff9b0d926eba7065e84782901687f74e6540a36dc6656a93f3c92c7bc7e06 SHA512 cef84bc173118a30db3ece5e5c6f874bf689c77afc40a4792fdcb7556555ac14a8e6de1dc811755405e5d162d63bc69abaecba30d220a42765160d69f0073fda |
23 |
DIST llvm-project-15.0.1.src.tar.xz.sig 438 BLAKE2B d8f634adab531bb19178fb27bc83b3a90c856e9402dd5af700f9af43813f68d20c21b9112dd95e9f6f10609ee51ed5aaf77edb96ca16fb93136b8aea432affd3 SHA512 cbf2570840d8dc12f6436c495a23cf9d439ee195755c01a6d1d5bcc20133599dc956dc43a0f5016698e3c9a960826f5f3c2840a73f993467e275856a67999fda |
24 |
+DIST llvm-project-215c9fa4deac9ec6b4e504843830551f03b60620.tar.gz 168942763 BLAKE2B 545c7c372c38667b7d811753464e91134aae600060d9054979eab8735d535a72d6bbb33a6008dc81f3b14513f58791ca3b8c3068e62ff146ccb14f32abb41a32 SHA512 d0c244357650ef5d56bc7afd836cd747cc2cce92d5f7fb4ddec3414e5bafe4e611acb2a7ff42343c184caad14a30fa9a6ced7e493df3ceb06fe8f9445aeb5a9b |
25 |
DIST llvm-project-303526ef3aa211c1930be2885deae15eeeda3b18.tar.gz 167503164 BLAKE2B 143c72c58517b3e40ee74c1a0df47bfd0d0f9e71926bc8c39a007e674a08df95d0ffe05f523f97e4409b248349e13719cabbc7ac6938feebe702959e84a07243 SHA512 9aa5c86de6c6be1d26c085eb29ea283429e41330e937e5fdbd545bb3f5b996ac82cd6268701fcbbd202e89ee35f2b67e595fc595bb7383778e9ad5fd52ca10a0 |
26 |
DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f |
27 |
|
28 |
diff --git a/sys-libs/compiler-rt/compiler-rt-16.0.0_pre20220930.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.0_pre20220930.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..236d4a319ccf |
31 |
--- /dev/null |
32 |
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.0_pre20220930.ebuild |
33 |
@@ -0,0 +1,151 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{8..11} ) |
40 |
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="Compiler runtime library for clang (built-in part)" |
43 |
+HOMEPAGE="https://llvm.org/" |
44 |
+ |
45 |
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
46 |
+SLOT="$(ver_cut 1-3)" |
47 |
+KEYWORDS="" |
48 |
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test" |
49 |
+RESTRICT="!test? ( test ) !clang? ( test )" |
50 |
+ |
51 |
+LLVM_MAX_SLOT=${SLOT%%.*} |
52 |
+DEPEND=" |
53 |
+ sys-devel/llvm:${LLVM_MAX_SLOT} |
54 |
+" |
55 |
+BDEPEND=" |
56 |
+ >=dev-util/cmake-3.16 |
57 |
+ clang? ( sys-devel/clang ) |
58 |
+ test? ( |
59 |
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]") |
60 |
+ =sys-devel/clang-${PV%_*}*:${LLVM_MAX_SLOT} |
61 |
+ ) |
62 |
+ !test? ( |
63 |
+ ${PYTHON_DEPS} |
64 |
+ ) |
65 |
+" |
66 |
+ |
67 |
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake ) |
68 |
+LLVM_PATCHSET=9999-1 |
69 |
+llvm.org_set_globals |
70 |
+ |
71 |
+python_check_deps() { |
72 |
+ use test || return 0 |
73 |
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]" |
74 |
+} |
75 |
+ |
76 |
+pkg_pretend() { |
77 |
+ if ! use clang && ! tc-is-clang; then |
78 |
+ ewarn "Building using a compiler other than clang may result in broken atomics" |
79 |
+ ewarn "library. Enable USE=clang unless you have a very good reason not to." |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ # Darwin Prefix builds do not have llvm installed yet, so rely on |
85 |
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead |
86 |
+ # of using llvm_pkg_setup. |
87 |
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then |
88 |
+ llvm_pkg_setup |
89 |
+ fi |
90 |
+ python-any-r1_pkg_setup |
91 |
+} |
92 |
+ |
93 |
+test_compiler() { |
94 |
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ |
95 |
+ <<<'int main() { return 0; }' &>/dev/null |
96 |
+} |
97 |
+ |
98 |
+src_configure() { |
99 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
100 |
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
101 |
+ |
102 |
+ # pre-set since we need to pass it to cmake |
103 |
+ BUILD_DIR=${WORKDIR}/${P}_build |
104 |
+ |
105 |
+ if use clang; then |
106 |
+ # Only do this conditionally to allow overriding with |
107 |
+ # e.g. CC=clang-13 in case of breakage |
108 |
+ if ! tc-is-clang ; then |
109 |
+ local -x CC=${CHOST}-clang |
110 |
+ local -x CXX=${CHOST}-clang++ |
111 |
+ fi |
112 |
+ |
113 |
+ strip-unsupported-flags |
114 |
+ fi |
115 |
+ |
116 |
+ if ! test_compiler; then |
117 |
+ local nolib_flags=( -nodefaultlibs -lc ) |
118 |
+ |
119 |
+ if test_compiler "${nolib_flags[@]}"; then |
120 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
121 |
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" |
122 |
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then |
123 |
+ # Avoiding -nostartfiles earlier on for bug #862540, |
124 |
+ # and set available entry symbol for bug #862798. |
125 |
+ nolib_flags+=( -nostartfiles -emain ) |
126 |
+ |
127 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
128 |
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" |
129 |
+ fi |
130 |
+ fi |
131 |
+ |
132 |
+ local mycmakeargs=( |
133 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
134 |
+ |
135 |
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
136 |
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF |
137 |
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF |
138 |
+ -DCOMPILER_RT_BUILD_ORC=OFF |
139 |
+ -DCOMPILER_RT_BUILD_PROFILE=OFF |
140 |
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF |
141 |
+ -DCOMPILER_RT_BUILD_XRAY=OFF |
142 |
+ |
143 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
144 |
+ ) |
145 |
+ |
146 |
+ if use amd64; then |
147 |
+ mycmakeargs+=( |
148 |
+ -DCAN_TARGET_i386=$(usex abi_x86_32) |
149 |
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64) |
150 |
+ ) |
151 |
+ fi |
152 |
+ |
153 |
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
154 |
+ mycmakeargs+=( |
155 |
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch |
156 |
+ # this allows adding arm64 support using SDK in EPREFIX |
157 |
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk" |
158 |
+ # Set version based on the SDK in EPREFIX. |
159 |
+ # This disables i386 for SDK >= 10.15 |
160 |
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')" |
161 |
+ # Use our libtool instead of looking it up with xcrun |
162 |
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" |
163 |
+ ) |
164 |
+ fi |
165 |
+ |
166 |
+ if use test; then |
167 |
+ mycmakeargs+=( |
168 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
169 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
170 |
+ |
171 |
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/bin/clang" |
172 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/bin/clang++" |
173 |
+ ) |
174 |
+ fi |
175 |
+ |
176 |
+ cmake_src_configure |
177 |
+} |
178 |
+ |
179 |
+src_test() { |
180 |
+ # respect TMPDIR! |
181 |
+ local -x LIT_PRESERVES_TMP=1 |
182 |
+ |
183 |
+ cmake_build check-builtins |
184 |
+} |