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/libcxx/
Date: Tue, 06 Sep 2022 08:01:12
Message-Id: 1662451210.8f8f51791ef2a0d31111352d45a90a6d833f51c1.mgorny@gentoo
1 commit: 8f8f51791ef2a0d31111352d45a90a6d833f51c1
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 6 08:00:10 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 6 08:00:10 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f8f5179
7
8 sys-libs/libcxx: Remove 15.0.0 RCs
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/libcxx/Manifest | 6 -
13 sys-libs/libcxx/libcxx-15.0.0_rc2.ebuild | 227 -------------------------------
14 sys-libs/libcxx/libcxx-15.0.0_rc3.ebuild | 227 -------------------------------
15 3 files changed, 460 deletions(-)
16
17 diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
18 index ff47886fe7d8..230179399ada 100644
19 --- a/sys-libs/libcxx/Manifest
20 +++ b/sys-libs/libcxx/Manifest
21 @@ -1,15 +1,9 @@
22 DIST llvm-gentoo-patchset-13.0.1.tar.xz 6288 BLAKE2B 899222b962486e924e4f8a2b574d285531a3f87af9385ff68c81db92aa224a0cde6d4ee049b5405056bedb4b232b50e1d5840024071a4a215f6311853304c92d SHA512 b2805337f1deca626768a44c5e7ac9ed16e0c31bead1647d44a493a8123c1b8e8f1c8ceee3536bcc6fa87fdd3fcec408229f701adf30eff07e7ef9889b847b01
23 DIST llvm-gentoo-patchset-14.0.6-r2.tar.xz 16120 BLAKE2B e12e522fdb7ba505693c679cb09cc8e00e6a954df195c86c2af4dbf1b68334a405b8dcc45f2e28b5e5e0b7e9d5eb7ba907337027927371b7a3b7784ff8aae7e0 SHA512 8a5ea71c30fc0727cc855dd812bbcb6d5f51c80c98eb3d5b80258d5c5eaab1310edc9d53ae63c2ca827abec68e2912c4b69ef0da351ff883fb30545a61e1d09c
24 -DIST llvm-gentoo-patchset-15.0.0-rc2.tar.xz 5768 BLAKE2B 03822c4dfbe3157d9131a3524beeda22fbc6adc937af052fd0fbcc23fb6ea86e1a5e015c316b53019820de5b81b1b065bfcbc31608598307f03af39f215fb12e SHA512 b9d7adb9b738a565c2142360c5ff7a7aa8405ce78af8767867203dd003e5bdb2b8a7f14179fdb7dc0c5cdc696cfff55c4886cfcd0894672284b453943e4e7269
25 -DIST llvm-gentoo-patchset-15.0.0-rc3.tar.xz 4036 BLAKE2B 0f8172f1d9ac674b7c888781138dcb1f55c7f73a98ee78d04e4e26442ac91ae2a6c6d6aaa45982a344e174e1d080247ab9c62bbb9adaa7fd20c5a481e0e8bfed SHA512 ebdf8d1d4f52150c99015e6dea4f3fd67f0a54284d52e946d104ff6c0f60efc716a1b39d3cdecf7b353cf139d8306793d37c10fe9269376d9846896fcf6415ad
26 DIST llvm-gentoo-patchset-15.0.0.tar.xz 4032 BLAKE2B 99c959eff6c8164147952aa5dc0621d1804b1e460c71bbfcf0c2a971f82e8405bc0c4dac327c27b6b459c4f45381466e883e502df14c84d8ba98495a437bfd47 SHA512 ce516b3401bd45696cf9ed0003de2f536695b8554fa3c2c35f14f1f1e2f0f115c20ef2b1d5319369cc536db4cb95cb508d34e7a6f8ef60f242547179e9d338a6
27 DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
28 DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
29 DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
30 DIST llvm-project-15.0.0.src.tar.xz 112062796 BLAKE2B 947917b6c75cbd8882133dc01f57013523274962371ac5ae4a22b010f8a7d5d31288c1d9847bf19ba919fa3110fe34a8ff937107fe19bd064ed87bf4d08d8a51 SHA512 e5aacbe7574dcec62017cc03c9fa2ee4cf075125a3d6c3975c38f06e91adcebb1ff92bcf40c6dd67db087813c60b15a04f1424c713d751199518b58025ce87fc
31 DIST llvm-project-15.0.0.src.tar.xz.sig 438 BLAKE2B 8eb12c259f94d8f867a31dbe05128adc1f9cc7ec8bcbdbe1738d2fad461f5d214e674f080f7f29b639a7a75f9c5b56c0f959f538697d647b94b97dc56b036e5f SHA512 4096464a46e07575b7cff448ff8bbc38fe972505f366b744419a06339cf32b93266b0fae5390879859041ce6710e4b675ed3ea7561d6a817623d7ece0e969661
32 -DIST llvm-project-15.0.0rc2.src.tar.xz 112110968 BLAKE2B 98c3769f17f1958fbec771409eef781f5ca845363656c70fe5cd20bca1b8471e7a8773a7d4e395700c297a5f3f208fe1303cf18e2a73b45388b782fb7484106b SHA512 eee1bee1f83cc468fb4bb6839acbd5c1618dc35f35e51cd078288b91bad95d52edaadd05c88f2d72d51c1c338ba08b3346c070a28693b1224639eb7a1ef4a4d9
33 -DIST llvm-project-15.0.0rc2.src.tar.xz.sig 438 BLAKE2B 09f260b30724b41b27ef621929c086fd6c13bde51c4adb880897b549b2d336682f617faf3dd636ceb795e329b664972cf50745ab49f84e7540658d53074510da SHA512 9f695a309fbb15026dc133eb17d33abd26831eb036fad79dd8df37d4f4d9eeae1ca463acd037d2a1882bc2cff763e4bda507d1d827d845613bfd62d0f9fbd4ca
34 -DIST llvm-project-15.0.0rc3.src.tar.xz 112081940 BLAKE2B 659359f8366ad09051fa2256c1aae8cea2049ab6428ce6b15a6845f7ee01a27bc2be2ab612adf8364cb2d699f19d09a7ea01eda74b266f14cc844662bcc833e0 SHA512 e4ac310c19fd6b710d372b9a53dffaf6736d4b5c23190fa98536be40f7c4e45670957dcbfb337e9d1dd44398df43d1ae736063eff2b2fd3d6fc752fae286d3bb
35 -DIST llvm-project-15.0.0rc3.src.tar.xz.sig 438 BLAKE2B 455181d3845ff1766f463d0e02caf72df8106dad16b8d54234f7f2fa0fcb5636abb06b2d35b5fdb8a3ed5c92a41a47d413d1bb76013cb914ce79913479a786e2 SHA512 80a67cf48186d2fbde997707e5d3d7a2dc3097f07e32ff45277e5185eb358d6b292821d8eaf8570fcc45560340663d62adb0380c675909c4c9c713e52704c800
36 DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
37
38 diff --git a/sys-libs/libcxx/libcxx-15.0.0_rc2.ebuild b/sys-libs/libcxx/libcxx-15.0.0_rc2.ebuild
39 deleted file mode 100644
40 index bfc8c058aead..000000000000
41 --- a/sys-libs/libcxx/libcxx-15.0.0_rc2.ebuild
42 +++ /dev/null
43 @@ -1,227 +0,0 @@
44 -# Copyright 1999-2022 Gentoo Authors
45 -# Distributed under the terms of the GNU General Public License v2
46 -
47 -EAPI=8
48 -
49 -PYTHON_COMPAT=( python3_{8..11} )
50 -inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
51 - toolchain-funcs
52 -
53 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
54 -HOMEPAGE="https://libcxx.llvm.org/"
55 -
56 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
57 -SLOT="0"
58 -KEYWORDS=""
59 -IUSE="+clang +libcxxabi static-libs test"
60 -REQUIRED_USE="test? ( clang )"
61 -RESTRICT="!test? ( test )"
62 -
63 -RDEPEND="
64 - libcxxabi? (
65 - ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
66 - )
67 - !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
68 -"
69 -# llvm-6 for new lit options
70 -# clang-3.9.0 installs necessary target symlinks unconditionally
71 -# which removes the need for MULTILIB_USEDEP
72 -DEPEND="
73 - ${RDEPEND}
74 - >=sys-devel/llvm-6
75 -"
76 -BDEPEND="
77 - clang? (
78 - sys-devel/clang
79 - )
80 - !test? (
81 - ${PYTHON_DEPS}
82 - )
83 - test? (
84 - >=dev-util/cmake-3.16
85 - sys-devel/gdb[python]
86 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
87 - )
88 -"
89 -
90 -LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
91 -LLVM_PATCHSET=${PV/_/-}
92 -llvm.org_set_globals
93 -
94 -python_check_deps() {
95 - use test || return 0
96 - python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
97 -}
98 -
99 -pkg_setup() {
100 - # Darwin Prefix builds do not have llvm installed yet, so rely on
101 - # bootstrap-prefix to set the appropriate path vars to LLVM instead
102 - # of using llvm_pkg_setup.
103 - if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
104 - llvm_pkg_setup
105 - fi
106 - python-any-r1_pkg_setup
107 -
108 - if ! use libcxxabi && ! tc-is-gcc ; then
109 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
110 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
111 - eerror "and try again."
112 - die
113 - fi
114 -}
115 -
116 -test_compiler() {
117 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
118 - <<<'int main() { return 0; }' &>/dev/null
119 -}
120 -
121 -src_configure() {
122 - # note: we need to do this before multilib kicks in since it will
123 - # alter the CHOST
124 - local cxxabi cxxabi_incs
125 - if use libcxxabi; then
126 - cxxabi=system-libcxxabi
127 - cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
128 - else
129 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
130 - cxxabi=libsupc++
131 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
132 - fi
133 -
134 - multilib-minimal_src_configure
135 -}
136 -
137 -multilib_src_configure() {
138 - if use clang && ! tc-is-clang; then
139 - # Only do this conditionally to allow overriding with
140 - # e.g. CC=clang-13 in case of breakage
141 - local -x CC=${CHOST}-clang
142 - local -x CXX=${CHOST}-clang++
143 - strip-unsupported-flags
144 - fi
145 -
146 - # link against compiler-rt instead of libgcc if this is what clang does
147 - local want_compiler_rt=OFF
148 - if tc-is-clang; then
149 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
150 - ${LDFLAGS} -print-libgcc-file-name)
151 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
152 - want_compiler_rt=ON
153 - fi
154 - fi
155 -
156 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
157 - local nolib_flags=( -nodefaultlibs -lc )
158 - if ! test_compiler; then
159 - if test_compiler "${nolib_flags[@]}"; then
160 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
161 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
162 - fi
163 - fi
164 -
165 - local libdir=$(get_libdir)
166 - local mycmakeargs=(
167 - -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
168 - -DPython3_EXECUTABLE="${PYTHON}"
169 - -DLLVM_ENABLE_RUNTIMES=libcxx
170 - -DLLVM_INCLUDE_TESTS=OFF
171 - -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
172 -
173 - -DLIBCXX_ENABLE_SHARED=ON
174 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
175 - -DLIBCXX_CXX_ABI=${cxxabi}
176 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
177 - # we're using our own mechanism for generating linker scripts
178 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
179 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
180 - -DLIBCXX_INCLUDE_BENCHMARKS=OFF
181 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
182 - -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
183 - )
184 -
185 - if use test; then
186 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
187 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
188 -
189 - mycmakeargs+=(
190 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
191 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
192 - -DPython3_EXECUTABLE="${PYTHON}"
193 - )
194 - fi
195 - cmake_src_configure
196 -}
197 -
198 -multilib_src_compile() {
199 - cmake_src_compile
200 - if [[ ${CHOST} != *-darwin* ]] ; then
201 - gen_shared_ldscript
202 - use static-libs && gen_static_ldscript
203 - fi
204 -}
205 -
206 -multilib_src_test() {
207 - local -x LIT_PRESERVES_TMP=1
208 - cmake_build check-cxx
209 -}
210 -
211 -multilib_src_install() {
212 - cmake_src_install
213 - # since we've replaced libc++.{a,so} with ldscripts, now we have to
214 - # install the extra symlinks
215 - if [[ ${CHOST} != *-darwin* ]] ; then
216 - dolib.so lib/libc++_shared.so
217 - use static-libs && dolib.a lib/libc++_static.a
218 - fi
219 -}
220 -
221 -# Usage: deps
222 -gen_ldscript() {
223 - local output_format
224 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
225 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
226 -
227 - cat <<-END_LDSCRIPT
228 -/* GNU ld script
229 - Include missing dependencies
230 -*/
231 -${output_format}
232 -GROUP ( $@ )
233 -END_LDSCRIPT
234 -}
235 -
236 -gen_static_ldscript() {
237 - # Move it first.
238 - mv lib/libc++{,_static}.a || die
239 - # Generate libc++.a ldscript for inclusion of its dependencies so that
240 - # clang++ -stdlib=libc++ -static works out of the box.
241 - local deps=(
242 - libc++_static.a
243 - $(usex libcxxabi libc++abi.a libsupc++.a)
244 - )
245 - # On Linux/glibc it does not link without libpthread or libdl. It is
246 - # fine on FreeBSD.
247 - use elibc_glibc && deps+=( libpthread.a libdl.a )
248 -
249 - gen_ldscript "${deps[*]}" > lib/libc++.a || die
250 -}
251 -
252 -gen_shared_ldscript() {
253 - # Move it first.
254 - mv lib/libc++{,_shared}.so || die
255 - local deps=(
256 - libc++_shared.so
257 - # libsupc++ doesn't have a shared version
258 - $(usex libcxxabi libc++abi.so libsupc++.a)
259 - )
260 -
261 - gen_ldscript "${deps[*]}" > lib/libc++.so || die
262 -}
263 -
264 -pkg_postinst() {
265 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
266 - elog "standard library when using clang."
267 - elog "To use it, instead of libstdc++, use:"
268 - elog " clang++ -stdlib=libc++"
269 - elog "to compile your C++ programs."
270 -}
271
272 diff --git a/sys-libs/libcxx/libcxx-15.0.0_rc3.ebuild b/sys-libs/libcxx/libcxx-15.0.0_rc3.ebuild
273 deleted file mode 100644
274 index bfc8c058aead..000000000000
275 --- a/sys-libs/libcxx/libcxx-15.0.0_rc3.ebuild
276 +++ /dev/null
277 @@ -1,227 +0,0 @@
278 -# Copyright 1999-2022 Gentoo Authors
279 -# Distributed under the terms of the GNU General Public License v2
280 -
281 -EAPI=8
282 -
283 -PYTHON_COMPAT=( python3_{8..11} )
284 -inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \
285 - toolchain-funcs
286 -
287 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
288 -HOMEPAGE="https://libcxx.llvm.org/"
289 -
290 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
291 -SLOT="0"
292 -KEYWORDS=""
293 -IUSE="+clang +libcxxabi static-libs test"
294 -REQUIRED_USE="test? ( clang )"
295 -RESTRICT="!test? ( test )"
296 -
297 -RDEPEND="
298 - libcxxabi? (
299 - ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
300 - )
301 - !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
302 -"
303 -# llvm-6 for new lit options
304 -# clang-3.9.0 installs necessary target symlinks unconditionally
305 -# which removes the need for MULTILIB_USEDEP
306 -DEPEND="
307 - ${RDEPEND}
308 - >=sys-devel/llvm-6
309 -"
310 -BDEPEND="
311 - clang? (
312 - sys-devel/clang
313 - )
314 - !test? (
315 - ${PYTHON_DEPS}
316 - )
317 - test? (
318 - >=dev-util/cmake-3.16
319 - sys-devel/gdb[python]
320 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
321 - )
322 -"
323 -
324 -LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
325 -LLVM_PATCHSET=${PV/_/-}
326 -llvm.org_set_globals
327 -
328 -python_check_deps() {
329 - use test || return 0
330 - python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
331 -}
332 -
333 -pkg_setup() {
334 - # Darwin Prefix builds do not have llvm installed yet, so rely on
335 - # bootstrap-prefix to set the appropriate path vars to LLVM instead
336 - # of using llvm_pkg_setup.
337 - if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
338 - llvm_pkg_setup
339 - fi
340 - python-any-r1_pkg_setup
341 -
342 - if ! use libcxxabi && ! tc-is-gcc ; then
343 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
344 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
345 - eerror "and try again."
346 - die
347 - fi
348 -}
349 -
350 -test_compiler() {
351 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
352 - <<<'int main() { return 0; }' &>/dev/null
353 -}
354 -
355 -src_configure() {
356 - # note: we need to do this before multilib kicks in since it will
357 - # alter the CHOST
358 - local cxxabi cxxabi_incs
359 - if use libcxxabi; then
360 - cxxabi=system-libcxxabi
361 - cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
362 - else
363 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
364 - cxxabi=libsupc++
365 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
366 - fi
367 -
368 - multilib-minimal_src_configure
369 -}
370 -
371 -multilib_src_configure() {
372 - if use clang && ! tc-is-clang; then
373 - # Only do this conditionally to allow overriding with
374 - # e.g. CC=clang-13 in case of breakage
375 - local -x CC=${CHOST}-clang
376 - local -x CXX=${CHOST}-clang++
377 - strip-unsupported-flags
378 - fi
379 -
380 - # link against compiler-rt instead of libgcc if this is what clang does
381 - local want_compiler_rt=OFF
382 - if tc-is-clang; then
383 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
384 - ${LDFLAGS} -print-libgcc-file-name)
385 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
386 - want_compiler_rt=ON
387 - fi
388 - fi
389 -
390 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
391 - local nolib_flags=( -nodefaultlibs -lc )
392 - if ! test_compiler; then
393 - if test_compiler "${nolib_flags[@]}"; then
394 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
395 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
396 - fi
397 - fi
398 -
399 - local libdir=$(get_libdir)
400 - local mycmakeargs=(
401 - -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
402 - -DPython3_EXECUTABLE="${PYTHON}"
403 - -DLLVM_ENABLE_RUNTIMES=libcxx
404 - -DLLVM_INCLUDE_TESTS=OFF
405 - -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
406 -
407 - -DLIBCXX_ENABLE_SHARED=ON
408 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
409 - -DLIBCXX_CXX_ABI=${cxxabi}
410 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
411 - # we're using our own mechanism for generating linker scripts
412 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
413 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
414 - -DLIBCXX_INCLUDE_BENCHMARKS=OFF
415 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
416 - -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
417 - )
418 -
419 - if use test; then
420 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
421 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
422 -
423 - mycmakeargs+=(
424 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
425 - -DLLVM_LIT_ARGS="$(get_lit_flags)"
426 - -DPython3_EXECUTABLE="${PYTHON}"
427 - )
428 - fi
429 - cmake_src_configure
430 -}
431 -
432 -multilib_src_compile() {
433 - cmake_src_compile
434 - if [[ ${CHOST} != *-darwin* ]] ; then
435 - gen_shared_ldscript
436 - use static-libs && gen_static_ldscript
437 - fi
438 -}
439 -
440 -multilib_src_test() {
441 - local -x LIT_PRESERVES_TMP=1
442 - cmake_build check-cxx
443 -}
444 -
445 -multilib_src_install() {
446 - cmake_src_install
447 - # since we've replaced libc++.{a,so} with ldscripts, now we have to
448 - # install the extra symlinks
449 - if [[ ${CHOST} != *-darwin* ]] ; then
450 - dolib.so lib/libc++_shared.so
451 - use static-libs && dolib.a lib/libc++_static.a
452 - fi
453 -}
454 -
455 -# Usage: deps
456 -gen_ldscript() {
457 - local output_format
458 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
459 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
460 -
461 - cat <<-END_LDSCRIPT
462 -/* GNU ld script
463 - Include missing dependencies
464 -*/
465 -${output_format}
466 -GROUP ( $@ )
467 -END_LDSCRIPT
468 -}
469 -
470 -gen_static_ldscript() {
471 - # Move it first.
472 - mv lib/libc++{,_static}.a || die
473 - # Generate libc++.a ldscript for inclusion of its dependencies so that
474 - # clang++ -stdlib=libc++ -static works out of the box.
475 - local deps=(
476 - libc++_static.a
477 - $(usex libcxxabi libc++abi.a libsupc++.a)
478 - )
479 - # On Linux/glibc it does not link without libpthread or libdl. It is
480 - # fine on FreeBSD.
481 - use elibc_glibc && deps+=( libpthread.a libdl.a )
482 -
483 - gen_ldscript "${deps[*]}" > lib/libc++.a || die
484 -}
485 -
486 -gen_shared_ldscript() {
487 - # Move it first.
488 - mv lib/libc++{,_shared}.so || die
489 - local deps=(
490 - libc++_shared.so
491 - # libsupc++ doesn't have a shared version
492 - $(usex libcxxabi libc++abi.so libsupc++.a)
493 - )
494 -
495 - gen_ldscript "${deps[*]}" > lib/libc++.so || die
496 -}
497 -
498 -pkg_postinst() {
499 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
500 - elog "standard library when using clang."
501 - elog "To use it, instead of libstdc++, use:"
502 - elog " clang++ -stdlib=libc++"
503 - elog "to compile your C++ programs."
504 -}