1 |
commit: 3a7432d2538ed9c293d97a83433518d548f21436 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 4 14:19:51 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 4 17:14:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a7432d2 |
7 |
|
8 |
sys-libs/compiler-rt: Add 16.0.0_pre20221104 |
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_pre20221104.ebuild | 150 +++++++++++++++++++++ |
14 |
2 files changed, 151 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest |
17 |
index b9118af0aa44..a2ce42e6c6e8 100644 |
18 |
--- a/sys-libs/compiler-rt/Manifest |
19 |
+++ b/sys-libs/compiler-rt/Manifest |
20 |
@@ -10,5 +10,6 @@ DIST llvm-project-15.0.3.src.tar.xz 112069972 BLAKE2B 3d29bab890467ba87fedcc4e76 |
21 |
DIST llvm-project-15.0.3.src.tar.xz.sig 438 BLAKE2B e7e0614e144eb878f694c12e97cf42ff8476e47cb55e8f259eb2ec52e303463ad753771271512e89baf0137c1382b11cfa028c85324174ebcd054a124000f537 SHA512 41229bebdb0c2df9a5e3a4d6f02d39fac7dc91f21895a659523beab4fa3ef99ff06eff5e4386221369b6e2b6f8fe974d67b7d8496d5911ce484d09ae0db8b916 |
22 |
DIST llvm-project-15.0.4.src.tar.xz 110936424 BLAKE2B a02b76ad161e352b4d3d84baffdada9c6a0e704de7a2c4017df4d4d05a9e9d02113791cd7d91c3edfa1f5bcb7ab95e1772d60f7061514928c6828600f41a8322 SHA512 9d5b664dd77c08130601636f9d6c006b257f369470ce823aa56d06698a9f0edfec42f2c90da934b9ad52c4d7960d9a024ea46dc9640275be6d191b1ba9869459 |
23 |
DIST llvm-project-15.0.4.src.tar.xz.sig 566 BLAKE2B f1a7be65fcce932dc125ae2b498f68a14e68dad0d7a1e031343c52c5dafb7b123e346f3efa50a7693584361abf01efe9401b1b5781dee6b92dc1045e538e9b7b SHA512 35899ffbd13fc44cade54246a423450571cb4b62b8d706864daa3eef2377c48e24ef3113218e39e29de995b7f7fa307f9187552766576c9050fd924beb517f6e |
24 |
+DIST llvm-project-1fb186198af5f183dde053c1396f899567755d64.tar.gz 170328817 BLAKE2B c79199044e8d636127d1d163ceea856c1bcb1d59c892e9c72869ab788b4feb23f8c28585ac761764b4e29b883c61e43be9341610a523d8b64471200bb3aecfaa SHA512 8b366dc70506ceb70a5584ad051e100fa1cc620388fc757536ef775d102b4baaac016d4f62dbc8b1d9dd00b587622a25d9da735196d336faf35d611145cf5fdc |
25 |
DIST llvm-project-b34ea582774c057d9bf5591174d683fd3d8aa02b.tar.gz 169735900 BLAKE2B d3a82a07f855b038071fc8eb3f41a88b4c220a577219985ecddeb9a535ea8b159dbad575699997d90a49db74c074b5f4354ad707e91d6934daaa7319e0d8ee9b SHA512 3f5525c7d893bdac701cff4cf82dafc31608920d788d9b7401654f320b2432528cf4ae8ef013182807b3dc0c5b758c71f1efeedb672dd47fdb8aa6f434dfb583 |
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_pre20221104.ebuild b/sys-libs/compiler-rt/compiler-rt-16.0.0_pre20221104.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..957caa27a746 |
31 |
--- /dev/null |
32 |
+++ b/sys-libs/compiler-rt/compiler-rt-16.0.0_pre20221104.ebuild |
33 |
@@ -0,0 +1,150 @@ |
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="${LLVM_VERSION}" |
47 |
+KEYWORDS="" |
48 |
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test" |
49 |
+RESTRICT="!test? ( test ) !clang? ( test )" |
50 |
+ |
51 |
+DEPEND=" |
52 |
+ sys-devel/llvm:${LLVM_MAJOR} |
53 |
+" |
54 |
+BDEPEND=" |
55 |
+ >=dev-util/cmake-3.16 |
56 |
+ clang? ( sys-devel/clang ) |
57 |
+ test? ( |
58 |
+ $(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]") |
59 |
+ =sys-devel/clang-${LLVM_VERSION}*:${LLVM_MAJOR} |
60 |
+ ) |
61 |
+ !test? ( |
62 |
+ ${PYTHON_DEPS} |
63 |
+ ) |
64 |
+" |
65 |
+ |
66 |
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake ) |
67 |
+LLVM_PATCHSET=9999-1 |
68 |
+llvm.org_set_globals |
69 |
+ |
70 |
+python_check_deps() { |
71 |
+ use test || return 0 |
72 |
+ python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]" |
73 |
+} |
74 |
+ |
75 |
+pkg_pretend() { |
76 |
+ if ! use clang && ! tc-is-clang; then |
77 |
+ ewarn "Building using a compiler other than clang may result in broken atomics" |
78 |
+ ewarn "library. Enable USE=clang unless you have a very good reason not to." |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
+pkg_setup() { |
83 |
+ # Darwin Prefix builds do not have llvm installed yet, so rely on |
84 |
+ # bootstrap-prefix to set the appropriate path vars to LLVM instead |
85 |
+ # of using llvm_pkg_setup. |
86 |
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then |
87 |
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
88 |
+ fi |
89 |
+ python-any-r1_pkg_setup |
90 |
+} |
91 |
+ |
92 |
+test_compiler() { |
93 |
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ |
94 |
+ <<<'int main() { return 0; }' &>/dev/null |
95 |
+} |
96 |
+ |
97 |
+src_configure() { |
98 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
99 |
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
100 |
+ |
101 |
+ # pre-set since we need to pass it to cmake |
102 |
+ BUILD_DIR=${WORKDIR}/${P}_build |
103 |
+ |
104 |
+ if use clang; then |
105 |
+ # Only do this conditionally to allow overriding with |
106 |
+ # e.g. CC=clang-13 in case of breakage |
107 |
+ if ! tc-is-clang ; then |
108 |
+ local -x CC=${CHOST}-clang |
109 |
+ local -x CXX=${CHOST}-clang++ |
110 |
+ fi |
111 |
+ |
112 |
+ strip-unsupported-flags |
113 |
+ fi |
114 |
+ |
115 |
+ if ! test_compiler; then |
116 |
+ local nolib_flags=( -nodefaultlibs -lc ) |
117 |
+ |
118 |
+ if test_compiler "${nolib_flags[@]}"; then |
119 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
120 |
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" |
121 |
+ elif test_compiler "${nolib_flags[@]}" -nostartfiles; then |
122 |
+ # Avoiding -nostartfiles earlier on for bug #862540, |
123 |
+ # and set available entry symbol for bug #862798. |
124 |
+ nolib_flags+=( -nostartfiles -emain ) |
125 |
+ |
126 |
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
127 |
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" |
128 |
+ fi |
129 |
+ fi |
130 |
+ |
131 |
+ local mycmakeargs=( |
132 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_VERSION}" |
133 |
+ |
134 |
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
135 |
+ -DCOMPILER_RT_BUILD_LIBFUZZER=OFF |
136 |
+ -DCOMPILER_RT_BUILD_MEMPROF=OFF |
137 |
+ -DCOMPILER_RT_BUILD_ORC=OFF |
138 |
+ -DCOMPILER_RT_BUILD_PROFILE=OFF |
139 |
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF |
140 |
+ -DCOMPILER_RT_BUILD_XRAY=OFF |
141 |
+ |
142 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
143 |
+ ) |
144 |
+ |
145 |
+ if use amd64; then |
146 |
+ mycmakeargs+=( |
147 |
+ -DCAN_TARGET_i386=$(usex abi_x86_32) |
148 |
+ -DCAN_TARGET_x86_64=$(usex abi_x86_64) |
149 |
+ ) |
150 |
+ fi |
151 |
+ |
152 |
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
153 |
+ mycmakeargs+=( |
154 |
+ # setting -isysroot is disabled with compiler-rt-prefix-paths.patch |
155 |
+ # this allows adding arm64 support using SDK in EPREFIX |
156 |
+ -DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk" |
157 |
+ # Set version based on the SDK in EPREFIX. |
158 |
+ # This disables i386 for SDK >= 10.15 |
159 |
+ -DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')" |
160 |
+ # Use our libtool instead of looking it up with xcrun |
161 |
+ -DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool" |
162 |
+ ) |
163 |
+ fi |
164 |
+ |
165 |
+ if use test; then |
166 |
+ mycmakeargs+=( |
167 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
168 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
169 |
+ |
170 |
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang" |
171 |
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++" |
172 |
+ ) |
173 |
+ fi |
174 |
+ |
175 |
+ cmake_src_configure |
176 |
+} |
177 |
+ |
178 |
+src_test() { |
179 |
+ # respect TMPDIR! |
180 |
+ local -x LIT_PRESERVES_TMP=1 |
181 |
+ |
182 |
+ cmake_build check-builtins |
183 |
+} |