1 |
commit: b99bafa903ad905960f573cfc6717e61953d7f8d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 13:08:04 2023 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 13:08:04 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b99bafa9 |
7 |
|
8 |
sys-libs/libcxx: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/libcxx/Manifest | 4 - |
13 |
sys-libs/libcxx/libcxx-16.0.0_rc2.ebuild | 204 ----------------------- |
14 |
sys-libs/libcxx/libcxx-17.0.0_pre20230211.ebuild | 204 ----------------------- |
15 |
sys-libs/libcxx/libcxx-17.0.0_pre20230218.ebuild | 204 ----------------------- |
16 |
4 files changed, 616 deletions(-) |
17 |
|
18 |
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest |
19 |
index f70193227a73..c9896fc7486d 100644 |
20 |
--- a/sys-libs/libcxx/Manifest |
21 |
+++ b/sys-libs/libcxx/Manifest |
22 |
@@ -4,10 +4,6 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f |
23 |
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6 |
24 |
DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52 |
25 |
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2 |
26 |
-DIST llvm-project-16.0.0rc2.src.tar.xz 117917640 BLAKE2B 92c6b1daaa500339403dcf530efb23e1d869c7b9cd8677a6680e57d5d087fb54182f009d58bdda714b62a5866d7fe3b10deedc1e251fffdaae513706d95325af SHA512 c68bb7f2a8004666ecc5c55e89e2ca1252b384e6240a2b7c5588b74794ffc6ce93bb4b0db394abba6436cce04a6de301e80821aeda04d7aab49efb96b6f8cf40 |
27 |
-DIST llvm-project-16.0.0rc2.src.tar.xz.sig 566 BLAKE2B 35b2a8edf3392e1c0e9bf7f1a5e6e18fdda3d98a2164947cebf0c19d7d7c7a459901060345745dff794cf99bea243fec5cb625ca68d7c73d31ac01f18cbaa58c SHA512 4f6d43f00c3bce36c3a005441473fe37fe2ca97df4b8dd306045bd0d8bd14406ae7068a3dea54d4535eaa37b7ccca54b3f5b6f5aef70a7dfc23ed336d4ad408c |
28 |
DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697 |
29 |
DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c |
30 |
-DIST llvm-project-22fb66eb94b643c858c2beecbcfac438a7fa29ed.tar.gz 179795537 BLAKE2B aef57ef739c52a8f8b2b327a8f6d8cce4734d9704018fb43a21468e56748e5d5b3d2d47fb4e95fd72b2af9f2e4be88839553e26fd7da08df60c5cc0f51c001d4 SHA512 9ed093ef7dac4891660aafbc5cad66bddefa796bff4dd70c792cc636268742142d82b84520ac2f5a5963521d7b9e4325440763ce0c88937f89722f07d3acd4b8 |
31 |
-DIST llvm-project-5e262d58c42668c78d932fab6bf75cf8c3b9d07e.tar.gz 179975303 BLAKE2B 184e7ff6e9a7de77d4a8c36c6910e4e3c7c5e9ff73ed6111ec4704dd457205278abb258ff37170e41a6b21c9ae3f243a80b34e4b17f8977fb9a42876db6465b7 SHA512 ec7e16a4d8f8292d1184ae08c1c5eda0dba1876e7d9c228eb0added5cde45f3094fde7eb1da662d436f85315850310cc0612210ff3ddf82967d5c2de0047a724 |
32 |
DIST llvm-project-b0676fb0fb0a44a4a1c4ec1f0270fef1f1842817.tar.gz 180277698 BLAKE2B d2c1e6a1942e51f5844c18605f38b005e9bb4123850a173e4c4b3d7b6a14f4986c7b276b40df4d0594ae04e869e92ba1a4269c5055c0229cfd28aa1bd709da4f SHA512 d1281b942dcc254641865f11b0c4fbd1d562d016681b6b7268549bed1cdb7d4536f743a8ed089095eaab9f4bfb9de624153f448bf13d0e22f8ea24a4d264df7b |
33 |
|
34 |
diff --git a/sys-libs/libcxx/libcxx-16.0.0_rc2.ebuild b/sys-libs/libcxx/libcxx-16.0.0_rc2.ebuild |
35 |
deleted file mode 100644 |
36 |
index bd6f3db60c4b..000000000000 |
37 |
--- a/sys-libs/libcxx/libcxx-16.0.0_rc2.ebuild |
38 |
+++ /dev/null |
39 |
@@ -1,204 +0,0 @@ |
40 |
-# Copyright 1999-2023 Gentoo Authors |
41 |
-# Distributed under the terms of the GNU General Public License v2 |
42 |
- |
43 |
-EAPI=8 |
44 |
- |
45 |
-PYTHON_COMPAT=( python3_{9..11} ) |
46 |
-inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \ |
47 |
- toolchain-funcs |
48 |
- |
49 |
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
50 |
-HOMEPAGE="https://libcxx.llvm.org/" |
51 |
- |
52 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
53 |
-SLOT="0" |
54 |
-KEYWORDS="~loong" |
55 |
-IUSE="+clang +libcxxabi static-libs test" |
56 |
-REQUIRED_USE="test? ( clang )" |
57 |
-RESTRICT="!test? ( test )" |
58 |
- |
59 |
-RDEPEND=" |
60 |
- libcxxabi? ( |
61 |
- ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}] |
62 |
- ) |
63 |
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] ) |
64 |
-" |
65 |
-DEPEND=" |
66 |
- ${RDEPEND} |
67 |
- sys-devel/llvm:${LLVM_MAJOR} |
68 |
-" |
69 |
-BDEPEND=" |
70 |
- clang? ( |
71 |
- sys-devel/clang:${LLVM_MAJOR} |
72 |
- ) |
73 |
- !test? ( |
74 |
- ${PYTHON_DEPS} |
75 |
- ) |
76 |
- test? ( |
77 |
- >=dev-util/cmake-3.16 |
78 |
- sys-devel/gdb[python] |
79 |
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
80 |
- ) |
81 |
-" |
82 |
- |
83 |
-LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake ) |
84 |
-llvm.org_set_globals |
85 |
- |
86 |
-python_check_deps() { |
87 |
- use test || return 0 |
88 |
- python_has_version "dev-python/lit[${PYTHON_USEDEP}]" |
89 |
-} |
90 |
- |
91 |
-pkg_setup() { |
92 |
- # Darwin Prefix builds do not have llvm installed yet, so rely on |
93 |
- # bootstrap-prefix to set the appropriate path vars to LLVM instead |
94 |
- # of using llvm_pkg_setup. |
95 |
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then |
96 |
- LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
97 |
- fi |
98 |
- python-any-r1_pkg_setup |
99 |
- |
100 |
- if ! use libcxxabi && ! tc-is-gcc ; then |
101 |
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other" |
102 |
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++" |
103 |
- eerror "and try again." |
104 |
- die |
105 |
- fi |
106 |
-} |
107 |
- |
108 |
-test_compiler() { |
109 |
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \ |
110 |
- <<<'int main() { return 0; }' &>/dev/null |
111 |
-} |
112 |
- |
113 |
-src_configure() { |
114 |
- # note: we need to do this before multilib kicks in since it will |
115 |
- # alter the CHOST |
116 |
- local cxxabi cxxabi_incs |
117 |
- if use libcxxabi; then |
118 |
- cxxabi=system-libcxxabi |
119 |
- cxxabi_incs="${EPREFIX}/usr/include/c++/v1" |
120 |
- else |
121 |
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)" |
122 |
- cxxabi=libsupc++ |
123 |
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}" |
124 |
- fi |
125 |
- |
126 |
- multilib-minimal_src_configure |
127 |
-} |
128 |
- |
129 |
-multilib_src_configure() { |
130 |
- if use clang; then |
131 |
- local -x CC=${CHOST}-clang |
132 |
- local -x CXX=${CHOST}-clang++ |
133 |
- strip-unsupported-flags |
134 |
- fi |
135 |
- |
136 |
- # link to compiler-rt |
137 |
- local use_compiler_rt=OFF |
138 |
- [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON |
139 |
- |
140 |
- # bootstrap: cmake is unhappy if compiler can't link to stdlib |
141 |
- local nolib_flags=( -nodefaultlibs -lc ) |
142 |
- if ! test_compiler; then |
143 |
- if test_compiler "${nolib_flags[@]}"; then |
144 |
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
145 |
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}" |
146 |
- fi |
147 |
- fi |
148 |
- |
149 |
- local libdir=$(get_libdir) |
150 |
- local mycmakeargs=( |
151 |
- -DCMAKE_CXX_COMPILER_TARGET="${CHOST}" |
152 |
- -DPython3_EXECUTABLE="${PYTHON}" |
153 |
- -DLLVM_ENABLE_RUNTIMES=libcxx |
154 |
- -DLLVM_INCLUDE_TESTS=OFF |
155 |
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
156 |
- |
157 |
- -DLIBCXX_ENABLE_SHARED=ON |
158 |
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs) |
159 |
- -DLIBCXX_CXX_ABI=${cxxabi} |
160 |
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} |
161 |
- # we're using our own mechanism for generating linker scripts |
162 |
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
163 |
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
164 |
- -DLIBCXX_INCLUDE_BENCHMARKS=OFF |
165 |
- -DLIBCXX_INCLUDE_TESTS=$(usex test) |
166 |
- -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt} |
167 |
- ) |
168 |
- |
169 |
- if use test; then |
170 |
- mycmakeargs+=( |
171 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
172 |
- -DLLVM_LIT_ARGS="$(get_lit_flags)" |
173 |
- -DPython3_EXECUTABLE="${PYTHON}" |
174 |
- ) |
175 |
- fi |
176 |
- cmake_src_configure |
177 |
-} |
178 |
- |
179 |
-multilib_src_compile() { |
180 |
- cmake_src_compile |
181 |
- if [[ ${CHOST} != *-darwin* ]] ; then |
182 |
- gen_shared_ldscript |
183 |
- use static-libs && gen_static_ldscript |
184 |
- fi |
185 |
-} |
186 |
- |
187 |
-multilib_src_test() { |
188 |
- local -x LIT_PRESERVES_TMP=1 |
189 |
- cmake_build check-cxx |
190 |
-} |
191 |
- |
192 |
-multilib_src_install() { |
193 |
- cmake_src_install |
194 |
- # since we've replaced libc++.{a,so} with ldscripts, now we have to |
195 |
- # install the extra symlinks |
196 |
- if [[ ${CHOST} != *-darwin* ]] ; then |
197 |
- dolib.so lib/libc++_shared.so |
198 |
- use static-libs && dolib.a lib/libc++_static.a |
199 |
- fi |
200 |
-} |
201 |
- |
202 |
-# Usage: deps |
203 |
-gen_ldscript() { |
204 |
- local output_format |
205 |
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |
206 |
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" |
207 |
- |
208 |
- cat <<-END_LDSCRIPT |
209 |
-/* GNU ld script |
210 |
- Include missing dependencies |
211 |
-*/ |
212 |
-${output_format} |
213 |
-GROUP ( $@ ) |
214 |
-END_LDSCRIPT |
215 |
-} |
216 |
- |
217 |
-gen_static_ldscript() { |
218 |
- # Move it first. |
219 |
- mv lib/libc++{,_static}.a || die |
220 |
- # Generate libc++.a ldscript for inclusion of its dependencies so that |
221 |
- # clang++ -stdlib=libc++ -static works out of the box. |
222 |
- local deps=( |
223 |
- libc++_static.a |
224 |
- $(usex libcxxabi libc++abi.a libsupc++.a) |
225 |
- ) |
226 |
- # On Linux/glibc it does not link without libpthread or libdl. It is |
227 |
- # fine on FreeBSD. |
228 |
- use elibc_glibc && deps+=( libpthread.a libdl.a ) |
229 |
- |
230 |
- gen_ldscript "${deps[*]}" > lib/libc++.a || die |
231 |
-} |
232 |
- |
233 |
-gen_shared_ldscript() { |
234 |
- # Move it first. |
235 |
- mv lib/libc++{,_shared}.so || die |
236 |
- local deps=( |
237 |
- libc++_shared.so |
238 |
- # libsupc++ doesn't have a shared version |
239 |
- $(usex libcxxabi libc++abi.so libsupc++.a) |
240 |
- ) |
241 |
- |
242 |
- gen_ldscript "${deps[*]}" > lib/libc++.so || die |
243 |
-} |
244 |
|
245 |
diff --git a/sys-libs/libcxx/libcxx-17.0.0_pre20230211.ebuild b/sys-libs/libcxx/libcxx-17.0.0_pre20230211.ebuild |
246 |
deleted file mode 100644 |
247 |
index 4eeb65e55e83..000000000000 |
248 |
--- a/sys-libs/libcxx/libcxx-17.0.0_pre20230211.ebuild |
249 |
+++ /dev/null |
250 |
@@ -1,204 +0,0 @@ |
251 |
-# Copyright 1999-2023 Gentoo Authors |
252 |
-# Distributed under the terms of the GNU General Public License v2 |
253 |
- |
254 |
-EAPI=8 |
255 |
- |
256 |
-PYTHON_COMPAT=( python3_{9..11} ) |
257 |
-inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \ |
258 |
- toolchain-funcs |
259 |
- |
260 |
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
261 |
-HOMEPAGE="https://libcxx.llvm.org/" |
262 |
- |
263 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
264 |
-SLOT="0" |
265 |
-KEYWORDS="" |
266 |
-IUSE="+clang +libcxxabi static-libs test" |
267 |
-REQUIRED_USE="test? ( clang )" |
268 |
-RESTRICT="!test? ( test )" |
269 |
- |
270 |
-RDEPEND=" |
271 |
- libcxxabi? ( |
272 |
- ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}] |
273 |
- ) |
274 |
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] ) |
275 |
-" |
276 |
-DEPEND=" |
277 |
- ${RDEPEND} |
278 |
- sys-devel/llvm:${LLVM_MAJOR} |
279 |
-" |
280 |
-BDEPEND=" |
281 |
- clang? ( |
282 |
- sys-devel/clang:${LLVM_MAJOR} |
283 |
- ) |
284 |
- !test? ( |
285 |
- ${PYTHON_DEPS} |
286 |
- ) |
287 |
- test? ( |
288 |
- >=dev-util/cmake-3.16 |
289 |
- sys-devel/gdb[python] |
290 |
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
291 |
- ) |
292 |
-" |
293 |
- |
294 |
-LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake ) |
295 |
-llvm.org_set_globals |
296 |
- |
297 |
-python_check_deps() { |
298 |
- use test || return 0 |
299 |
- python_has_version "dev-python/lit[${PYTHON_USEDEP}]" |
300 |
-} |
301 |
- |
302 |
-pkg_setup() { |
303 |
- # Darwin Prefix builds do not have llvm installed yet, so rely on |
304 |
- # bootstrap-prefix to set the appropriate path vars to LLVM instead |
305 |
- # of using llvm_pkg_setup. |
306 |
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then |
307 |
- LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
308 |
- fi |
309 |
- python-any-r1_pkg_setup |
310 |
- |
311 |
- if ! use libcxxabi && ! tc-is-gcc ; then |
312 |
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other" |
313 |
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++" |
314 |
- eerror "and try again." |
315 |
- die |
316 |
- fi |
317 |
-} |
318 |
- |
319 |
-test_compiler() { |
320 |
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \ |
321 |
- <<<'int main() { return 0; }' &>/dev/null |
322 |
-} |
323 |
- |
324 |
-src_configure() { |
325 |
- # note: we need to do this before multilib kicks in since it will |
326 |
- # alter the CHOST |
327 |
- local cxxabi cxxabi_incs |
328 |
- if use libcxxabi; then |
329 |
- cxxabi=system-libcxxabi |
330 |
- cxxabi_incs="${EPREFIX}/usr/include/c++/v1" |
331 |
- else |
332 |
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)" |
333 |
- cxxabi=libsupc++ |
334 |
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}" |
335 |
- fi |
336 |
- |
337 |
- multilib-minimal_src_configure |
338 |
-} |
339 |
- |
340 |
-multilib_src_configure() { |
341 |
- if use clang; then |
342 |
- local -x CC=${CHOST}-clang |
343 |
- local -x CXX=${CHOST}-clang++ |
344 |
- strip-unsupported-flags |
345 |
- fi |
346 |
- |
347 |
- # link to compiler-rt |
348 |
- local use_compiler_rt=OFF |
349 |
- [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON |
350 |
- |
351 |
- # bootstrap: cmake is unhappy if compiler can't link to stdlib |
352 |
- local nolib_flags=( -nodefaultlibs -lc ) |
353 |
- if ! test_compiler; then |
354 |
- if test_compiler "${nolib_flags[@]}"; then |
355 |
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
356 |
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}" |
357 |
- fi |
358 |
- fi |
359 |
- |
360 |
- local libdir=$(get_libdir) |
361 |
- local mycmakeargs=( |
362 |
- -DCMAKE_CXX_COMPILER_TARGET="${CHOST}" |
363 |
- -DPython3_EXECUTABLE="${PYTHON}" |
364 |
- -DLLVM_ENABLE_RUNTIMES=libcxx |
365 |
- -DLLVM_INCLUDE_TESTS=OFF |
366 |
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
367 |
- |
368 |
- -DLIBCXX_ENABLE_SHARED=ON |
369 |
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs) |
370 |
- -DLIBCXX_CXX_ABI=${cxxabi} |
371 |
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} |
372 |
- # we're using our own mechanism for generating linker scripts |
373 |
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
374 |
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
375 |
- -DLIBCXX_INCLUDE_BENCHMARKS=OFF |
376 |
- -DLIBCXX_INCLUDE_TESTS=$(usex test) |
377 |
- -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt} |
378 |
- ) |
379 |
- |
380 |
- if use test; then |
381 |
- mycmakeargs+=( |
382 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
383 |
- -DLLVM_LIT_ARGS="$(get_lit_flags)" |
384 |
- -DPython3_EXECUTABLE="${PYTHON}" |
385 |
- ) |
386 |
- fi |
387 |
- cmake_src_configure |
388 |
-} |
389 |
- |
390 |
-multilib_src_compile() { |
391 |
- cmake_src_compile |
392 |
- if [[ ${CHOST} != *-darwin* ]] ; then |
393 |
- gen_shared_ldscript |
394 |
- use static-libs && gen_static_ldscript |
395 |
- fi |
396 |
-} |
397 |
- |
398 |
-multilib_src_test() { |
399 |
- local -x LIT_PRESERVES_TMP=1 |
400 |
- cmake_build check-cxx |
401 |
-} |
402 |
- |
403 |
-multilib_src_install() { |
404 |
- cmake_src_install |
405 |
- # since we've replaced libc++.{a,so} with ldscripts, now we have to |
406 |
- # install the extra symlinks |
407 |
- if [[ ${CHOST} != *-darwin* ]] ; then |
408 |
- dolib.so lib/libc++_shared.so |
409 |
- use static-libs && dolib.a lib/libc++_static.a |
410 |
- fi |
411 |
-} |
412 |
- |
413 |
-# Usage: deps |
414 |
-gen_ldscript() { |
415 |
- local output_format |
416 |
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |
417 |
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" |
418 |
- |
419 |
- cat <<-END_LDSCRIPT |
420 |
-/* GNU ld script |
421 |
- Include missing dependencies |
422 |
-*/ |
423 |
-${output_format} |
424 |
-GROUP ( $@ ) |
425 |
-END_LDSCRIPT |
426 |
-} |
427 |
- |
428 |
-gen_static_ldscript() { |
429 |
- # Move it first. |
430 |
- mv lib/libc++{,_static}.a || die |
431 |
- # Generate libc++.a ldscript for inclusion of its dependencies so that |
432 |
- # clang++ -stdlib=libc++ -static works out of the box. |
433 |
- local deps=( |
434 |
- libc++_static.a |
435 |
- $(usex libcxxabi libc++abi.a libsupc++.a) |
436 |
- ) |
437 |
- # On Linux/glibc it does not link without libpthread or libdl. It is |
438 |
- # fine on FreeBSD. |
439 |
- use elibc_glibc && deps+=( libpthread.a libdl.a ) |
440 |
- |
441 |
- gen_ldscript "${deps[*]}" > lib/libc++.a || die |
442 |
-} |
443 |
- |
444 |
-gen_shared_ldscript() { |
445 |
- # Move it first. |
446 |
- mv lib/libc++{,_shared}.so || die |
447 |
- local deps=( |
448 |
- libc++_shared.so |
449 |
- # libsupc++ doesn't have a shared version |
450 |
- $(usex libcxxabi libc++abi.so libsupc++.a) |
451 |
- ) |
452 |
- |
453 |
- gen_ldscript "${deps[*]}" > lib/libc++.so || die |
454 |
-} |
455 |
|
456 |
diff --git a/sys-libs/libcxx/libcxx-17.0.0_pre20230218.ebuild b/sys-libs/libcxx/libcxx-17.0.0_pre20230218.ebuild |
457 |
deleted file mode 100644 |
458 |
index 4eeb65e55e83..000000000000 |
459 |
--- a/sys-libs/libcxx/libcxx-17.0.0_pre20230218.ebuild |
460 |
+++ /dev/null |
461 |
@@ -1,204 +0,0 @@ |
462 |
-# Copyright 1999-2023 Gentoo Authors |
463 |
-# Distributed under the terms of the GNU General Public License v2 |
464 |
- |
465 |
-EAPI=8 |
466 |
- |
467 |
-PYTHON_COMPAT=( python3_{9..11} ) |
468 |
-inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \ |
469 |
- toolchain-funcs |
470 |
- |
471 |
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
472 |
-HOMEPAGE="https://libcxx.llvm.org/" |
473 |
- |
474 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
475 |
-SLOT="0" |
476 |
-KEYWORDS="" |
477 |
-IUSE="+clang +libcxxabi static-libs test" |
478 |
-REQUIRED_USE="test? ( clang )" |
479 |
-RESTRICT="!test? ( test )" |
480 |
- |
481 |
-RDEPEND=" |
482 |
- libcxxabi? ( |
483 |
- ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}] |
484 |
- ) |
485 |
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] ) |
486 |
-" |
487 |
-DEPEND=" |
488 |
- ${RDEPEND} |
489 |
- sys-devel/llvm:${LLVM_MAJOR} |
490 |
-" |
491 |
-BDEPEND=" |
492 |
- clang? ( |
493 |
- sys-devel/clang:${LLVM_MAJOR} |
494 |
- ) |
495 |
- !test? ( |
496 |
- ${PYTHON_DEPS} |
497 |
- ) |
498 |
- test? ( |
499 |
- >=dev-util/cmake-3.16 |
500 |
- sys-devel/gdb[python] |
501 |
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
502 |
- ) |
503 |
-" |
504 |
- |
505 |
-LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake ) |
506 |
-llvm.org_set_globals |
507 |
- |
508 |
-python_check_deps() { |
509 |
- use test || return 0 |
510 |
- python_has_version "dev-python/lit[${PYTHON_USEDEP}]" |
511 |
-} |
512 |
- |
513 |
-pkg_setup() { |
514 |
- # Darwin Prefix builds do not have llvm installed yet, so rely on |
515 |
- # bootstrap-prefix to set the appropriate path vars to LLVM instead |
516 |
- # of using llvm_pkg_setup. |
517 |
- if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then |
518 |
- LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
519 |
- fi |
520 |
- python-any-r1_pkg_setup |
521 |
- |
522 |
- if ! use libcxxabi && ! tc-is-gcc ; then |
523 |
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other" |
524 |
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++" |
525 |
- eerror "and try again." |
526 |
- die |
527 |
- fi |
528 |
-} |
529 |
- |
530 |
-test_compiler() { |
531 |
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \ |
532 |
- <<<'int main() { return 0; }' &>/dev/null |
533 |
-} |
534 |
- |
535 |
-src_configure() { |
536 |
- # note: we need to do this before multilib kicks in since it will |
537 |
- # alter the CHOST |
538 |
- local cxxabi cxxabi_incs |
539 |
- if use libcxxabi; then |
540 |
- cxxabi=system-libcxxabi |
541 |
- cxxabi_incs="${EPREFIX}/usr/include/c++/v1" |
542 |
- else |
543 |
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)" |
544 |
- cxxabi=libsupc++ |
545 |
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}" |
546 |
- fi |
547 |
- |
548 |
- multilib-minimal_src_configure |
549 |
-} |
550 |
- |
551 |
-multilib_src_configure() { |
552 |
- if use clang; then |
553 |
- local -x CC=${CHOST}-clang |
554 |
- local -x CXX=${CHOST}-clang++ |
555 |
- strip-unsupported-flags |
556 |
- fi |
557 |
- |
558 |
- # link to compiler-rt |
559 |
- local use_compiler_rt=OFF |
560 |
- [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON |
561 |
- |
562 |
- # bootstrap: cmake is unhappy if compiler can't link to stdlib |
563 |
- local nolib_flags=( -nodefaultlibs -lc ) |
564 |
- if ! test_compiler; then |
565 |
- if test_compiler "${nolib_flags[@]}"; then |
566 |
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
567 |
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}" |
568 |
- fi |
569 |
- fi |
570 |
- |
571 |
- local libdir=$(get_libdir) |
572 |
- local mycmakeargs=( |
573 |
- -DCMAKE_CXX_COMPILER_TARGET="${CHOST}" |
574 |
- -DPython3_EXECUTABLE="${PYTHON}" |
575 |
- -DLLVM_ENABLE_RUNTIMES=libcxx |
576 |
- -DLLVM_INCLUDE_TESTS=OFF |
577 |
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
578 |
- |
579 |
- -DLIBCXX_ENABLE_SHARED=ON |
580 |
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs) |
581 |
- -DLIBCXX_CXX_ABI=${cxxabi} |
582 |
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} |
583 |
- # we're using our own mechanism for generating linker scripts |
584 |
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
585 |
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
586 |
- -DLIBCXX_INCLUDE_BENCHMARKS=OFF |
587 |
- -DLIBCXX_INCLUDE_TESTS=$(usex test) |
588 |
- -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt} |
589 |
- ) |
590 |
- |
591 |
- if use test; then |
592 |
- mycmakeargs+=( |
593 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
594 |
- -DLLVM_LIT_ARGS="$(get_lit_flags)" |
595 |
- -DPython3_EXECUTABLE="${PYTHON}" |
596 |
- ) |
597 |
- fi |
598 |
- cmake_src_configure |
599 |
-} |
600 |
- |
601 |
-multilib_src_compile() { |
602 |
- cmake_src_compile |
603 |
- if [[ ${CHOST} != *-darwin* ]] ; then |
604 |
- gen_shared_ldscript |
605 |
- use static-libs && gen_static_ldscript |
606 |
- fi |
607 |
-} |
608 |
- |
609 |
-multilib_src_test() { |
610 |
- local -x LIT_PRESERVES_TMP=1 |
611 |
- cmake_build check-cxx |
612 |
-} |
613 |
- |
614 |
-multilib_src_install() { |
615 |
- cmake_src_install |
616 |
- # since we've replaced libc++.{a,so} with ldscripts, now we have to |
617 |
- # install the extra symlinks |
618 |
- if [[ ${CHOST} != *-darwin* ]] ; then |
619 |
- dolib.so lib/libc++_shared.so |
620 |
- use static-libs && dolib.a lib/libc++_static.a |
621 |
- fi |
622 |
-} |
623 |
- |
624 |
-# Usage: deps |
625 |
-gen_ldscript() { |
626 |
- local output_format |
627 |
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |
628 |
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" |
629 |
- |
630 |
- cat <<-END_LDSCRIPT |
631 |
-/* GNU ld script |
632 |
- Include missing dependencies |
633 |
-*/ |
634 |
-${output_format} |
635 |
-GROUP ( $@ ) |
636 |
-END_LDSCRIPT |
637 |
-} |
638 |
- |
639 |
-gen_static_ldscript() { |
640 |
- # Move it first. |
641 |
- mv lib/libc++{,_static}.a || die |
642 |
- # Generate libc++.a ldscript for inclusion of its dependencies so that |
643 |
- # clang++ -stdlib=libc++ -static works out of the box. |
644 |
- local deps=( |
645 |
- libc++_static.a |
646 |
- $(usex libcxxabi libc++abi.a libsupc++.a) |
647 |
- ) |
648 |
- # On Linux/glibc it does not link without libpthread or libdl. It is |
649 |
- # fine on FreeBSD. |
650 |
- use elibc_glibc && deps+=( libpthread.a libdl.a ) |
651 |
- |
652 |
- gen_ldscript "${deps[*]}" > lib/libc++.a || die |
653 |
-} |
654 |
- |
655 |
-gen_shared_ldscript() { |
656 |
- # Move it first. |
657 |
- mv lib/libc++{,_shared}.so || die |
658 |
- local deps=( |
659 |
- libc++_shared.so |
660 |
- # libsupc++ doesn't have a shared version |
661 |
- $(usex libcxxabi libc++abi.so libsupc++.a) |
662 |
- ) |
663 |
- |
664 |
- gen_ldscript "${deps[*]}" > lib/libc++.so || die |
665 |
-} |