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: Mon, 12 Oct 2020 12:38:37
Message-Id: 1602506295.d1fb881ba686b9ecaea273acb20d61177e1e9186.mgorny@gentoo
1 commit: d1fb881ba686b9ecaea273acb20d61177e1e9186
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 12 09:16:17 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 12 12:38:15 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1fb881b
7
8 sys-libs/libcxx: Remove 11.0.0 RCs
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/libcxx/Manifest | 3 -
13 sys-libs/libcxx/libcxx-11.0.0_rc3.ebuild | 197 -------------------------------
14 sys-libs/libcxx/libcxx-11.0.0_rc4.ebuild | 197 -------------------------------
15 sys-libs/libcxx/libcxx-11.0.0_rc6.ebuild | 197 -------------------------------
16 4 files changed, 594 deletions(-)
17
18 diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
19 index dc8a7ae8e29..52eb105e0cf 100644
20 --- a/sys-libs/libcxx/Manifest
21 +++ b/sys-libs/libcxx/Manifest
22 @@ -1,7 +1,4 @@
23 DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
24 DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
25 -DIST llvmorg-11.0.0-rc3.tar.gz 122766783 BLAKE2B 052fdc864fed52692141284ebdc41d52d21fbeaf24ac5ed3e67701537baa683bae61b1c06de68322e0578a27a1f5a8856088cdc001d2b8d34d2ec88ae65ff739 SHA512 a28ce74775373c63fe23b3116cd25db0efb95c6fdb60e56f2522659a404a59576f3d9429a109cb0f90534927259289aa1c712673f36f92272d642bf8dce5699f
26 -DIST llvmorg-11.0.0-rc4.tar.gz 122768150 BLAKE2B e92417b6e1775a10c196534518036de6393e3cb9e0e656d4f864e7870be8fb0dad3f4cf170345e653ba60f36172df117977d5dfebe3d9ee7ec2c160d3dc9c5cd SHA512 ed2aee9f6d0bb887f27840158e9f95d94c9ad3981a0388a33fcd3e405f5072134a02999075238b6a2b8803149aa08ac790214605b186c2cc2d4827ba53c00de1
27 -DIST llvmorg-11.0.0-rc6.tar.gz 122769521 BLAKE2B 0d03f385447902846dcb8150bda85ac0ab42153f63bb653befc18ed1cba357493065777750447b0ac71c077f61ea8c8f7a4c313ea5f3079926ffd012ace0debd SHA512 249b8e685cfc45a651f4dbd777b10298251c77476b57f9657860644ded612f810224d16879225d17b7a6ac9d584d63d53a33ac114c38e1cf86dd9e8d0faed9a9
28 DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2
29 DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
30
31 diff --git a/sys-libs/libcxx/libcxx-11.0.0_rc3.ebuild b/sys-libs/libcxx/libcxx-11.0.0_rc3.ebuild
32 deleted file mode 100644
33 index 22c6462abd9..00000000000
34 --- a/sys-libs/libcxx/libcxx-11.0.0_rc3.ebuild
35 +++ /dev/null
36 @@ -1,197 +0,0 @@
37 -# Copyright 1999-2020 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=7
41 -
42 -CMAKE_ECLASS=cmake
43 -PYTHON_COMPAT=( python3_{6..9} )
44 -inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
45 -
46 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
47 -HOMEPAGE="https://libcxx.llvm.org/"
48 -LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
49 -llvm.org_set_globals
50 -
51 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
52 -SLOT="0"
53 -KEYWORDS=""
54 -IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind +static-libs test"
55 -REQUIRED_USE="libunwind? ( libcxxabi )"
56 -RESTRICT="!test? ( test )"
57 -
58 -RDEPEND="
59 - libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
60 - !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
61 -# llvm-6 for new lit options
62 -# clang-3.9.0 installs necessary target symlinks unconditionally
63 -# which removes the need for MULTILIB_USEDEP
64 -DEPEND="${RDEPEND}
65 - >=sys-devel/llvm-6"
66 -BDEPEND="
67 - test? ( >=sys-devel/clang-3.9.0
68 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
69 -
70 -DOCS=( CREDITS.TXT )
71 -
72 -python_check_deps() {
73 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
74 -}
75 -
76 -pkg_setup() {
77 - llvm_pkg_setup
78 - use test && python-any-r1_pkg_setup
79 -
80 - if ! use libcxxabi && ! tc-is-gcc ; then
81 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
82 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
83 - eerror "and try again."
84 - die
85 - fi
86 -}
87 -
88 -src_prepare() {
89 - # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
90 - # out-of-tree build.
91 - eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
92 -
93 - llvm.org_src_prepare
94 -}
95 -
96 -test_compiler() {
97 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
98 - <<<'int main() { return 0; }' &>/dev/null
99 -}
100 -
101 -src_configure() {
102 - # note: we need to do this before multilib kicks in since it will
103 - # alter the CHOST
104 - local cxxabi cxxabi_incs
105 - if use libcxxabi; then
106 - cxxabi=libcxxabi
107 - cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
108 - else
109 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
110 - cxxabi=libsupc++
111 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
112 - fi
113 -
114 - multilib-minimal_src_configure
115 -}
116 -
117 -multilib_src_configure() {
118 - # we want -lgcc_s for unwinder, and for compiler runtime when using
119 - # gcc, clang with gcc runtime (or any unknown compiler)
120 - local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
121 - if use libunwind; then
122 - # work-around missing -lunwind upstream
123 - extra_libs+=( -lunwind )
124 - # if we're using libunwind and clang with compiler-rt, we want
125 - # to link to compiler-rt instead of -lgcc_s
126 - if tc-is-clang; then
127 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
128 - ${LDFLAGS} -print-libgcc-file-name)
129 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
130 - want_gcc_s=OFF
131 - want_compiler_rt=ON
132 - extra_libs+=( "${compiler_rt}" )
133 - fi
134 - fi
135 - fi
136 -
137 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
138 - local nolib_flags=( -nodefaultlibs -lc )
139 - if ! test_compiler; then
140 - if test_compiler "${nolib_flags[@]}"; then
141 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
142 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
143 - fi
144 - fi
145 -
146 - local libdir=$(get_libdir)
147 - local mycmakeargs=(
148 - -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
149 - -DLIBCXX_ENABLE_SHARED=ON
150 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
151 - -DLIBCXX_CXX_ABI=${cxxabi}
152 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
153 - # we're using our own mechanism for generating linker scripts
154 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
155 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
156 - -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
157 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
158 - -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
159 - -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
160 - )
161 -
162 - if use test; then
163 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
164 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
165 -
166 - mycmakeargs+=(
167 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
168 - -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
169 - )
170 - fi
171 - cmake_src_configure
172 -}
173 -
174 -multilib_src_test() {
175 - local -x LIT_PRESERVES_TMP=1
176 - cmake_build check-cxx
177 -}
178 -
179 -# Usage: deps
180 -gen_ldscript() {
181 - local output_format
182 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
183 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
184 -
185 - cat <<-END_LDSCRIPT
186 -/* GNU ld script
187 - Include missing dependencies
188 -*/
189 -${output_format}
190 -GROUP ( $@ )
191 -END_LDSCRIPT
192 -}
193 -
194 -gen_static_ldscript() {
195 - local libdir=$(get_libdir)
196 - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
197 -
198 - # Move it first.
199 - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
200 - # Generate libc++.a ldscript for inclusion of its dependencies so that
201 - # clang++ -stdlib=libc++ -static works out of the box.
202 - local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
203 - # On Linux/glibc it does not link without libpthread or libdl. It is
204 - # fine on FreeBSD.
205 - use elibc_glibc && deps+=" libpthread.a libdl.a"
206 -
207 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
208 -}
209 -
210 -gen_shared_ldscript() {
211 - local libdir=$(get_libdir)
212 - # libsupc++ doesn't have a shared version
213 - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
214 -
215 - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
216 - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
217 -
218 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
219 -}
220 -
221 -multilib_src_install() {
222 - cmake_src_install
223 - gen_shared_ldscript
224 - use static-libs && gen_static_ldscript
225 -}
226 -
227 -pkg_postinst() {
228 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
229 - elog "standard library when using clang."
230 - elog "To use it, instead of libstdc++, use:"
231 - elog " clang++ -stdlib=libc++"
232 - elog "to compile your C++ programs."
233 -}
234
235 diff --git a/sys-libs/libcxx/libcxx-11.0.0_rc4.ebuild b/sys-libs/libcxx/libcxx-11.0.0_rc4.ebuild
236 deleted file mode 100644
237 index 22c6462abd9..00000000000
238 --- a/sys-libs/libcxx/libcxx-11.0.0_rc4.ebuild
239 +++ /dev/null
240 @@ -1,197 +0,0 @@
241 -# Copyright 1999-2020 Gentoo Authors
242 -# Distributed under the terms of the GNU General Public License v2
243 -
244 -EAPI=7
245 -
246 -CMAKE_ECLASS=cmake
247 -PYTHON_COMPAT=( python3_{6..9} )
248 -inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
249 -
250 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
251 -HOMEPAGE="https://libcxx.llvm.org/"
252 -LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
253 -llvm.org_set_globals
254 -
255 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
256 -SLOT="0"
257 -KEYWORDS=""
258 -IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind +static-libs test"
259 -REQUIRED_USE="libunwind? ( libcxxabi )"
260 -RESTRICT="!test? ( test )"
261 -
262 -RDEPEND="
263 - libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
264 - !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
265 -# llvm-6 for new lit options
266 -# clang-3.9.0 installs necessary target symlinks unconditionally
267 -# which removes the need for MULTILIB_USEDEP
268 -DEPEND="${RDEPEND}
269 - >=sys-devel/llvm-6"
270 -BDEPEND="
271 - test? ( >=sys-devel/clang-3.9.0
272 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
273 -
274 -DOCS=( CREDITS.TXT )
275 -
276 -python_check_deps() {
277 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
278 -}
279 -
280 -pkg_setup() {
281 - llvm_pkg_setup
282 - use test && python-any-r1_pkg_setup
283 -
284 - if ! use libcxxabi && ! tc-is-gcc ; then
285 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
286 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
287 - eerror "and try again."
288 - die
289 - fi
290 -}
291 -
292 -src_prepare() {
293 - # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
294 - # out-of-tree build.
295 - eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
296 -
297 - llvm.org_src_prepare
298 -}
299 -
300 -test_compiler() {
301 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
302 - <<<'int main() { return 0; }' &>/dev/null
303 -}
304 -
305 -src_configure() {
306 - # note: we need to do this before multilib kicks in since it will
307 - # alter the CHOST
308 - local cxxabi cxxabi_incs
309 - if use libcxxabi; then
310 - cxxabi=libcxxabi
311 - cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
312 - else
313 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
314 - cxxabi=libsupc++
315 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
316 - fi
317 -
318 - multilib-minimal_src_configure
319 -}
320 -
321 -multilib_src_configure() {
322 - # we want -lgcc_s for unwinder, and for compiler runtime when using
323 - # gcc, clang with gcc runtime (or any unknown compiler)
324 - local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
325 - if use libunwind; then
326 - # work-around missing -lunwind upstream
327 - extra_libs+=( -lunwind )
328 - # if we're using libunwind and clang with compiler-rt, we want
329 - # to link to compiler-rt instead of -lgcc_s
330 - if tc-is-clang; then
331 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
332 - ${LDFLAGS} -print-libgcc-file-name)
333 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
334 - want_gcc_s=OFF
335 - want_compiler_rt=ON
336 - extra_libs+=( "${compiler_rt}" )
337 - fi
338 - fi
339 - fi
340 -
341 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
342 - local nolib_flags=( -nodefaultlibs -lc )
343 - if ! test_compiler; then
344 - if test_compiler "${nolib_flags[@]}"; then
345 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
346 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
347 - fi
348 - fi
349 -
350 - local libdir=$(get_libdir)
351 - local mycmakeargs=(
352 - -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
353 - -DLIBCXX_ENABLE_SHARED=ON
354 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
355 - -DLIBCXX_CXX_ABI=${cxxabi}
356 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
357 - # we're using our own mechanism for generating linker scripts
358 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
359 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
360 - -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
361 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
362 - -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
363 - -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
364 - )
365 -
366 - if use test; then
367 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
368 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
369 -
370 - mycmakeargs+=(
371 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
372 - -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
373 - )
374 - fi
375 - cmake_src_configure
376 -}
377 -
378 -multilib_src_test() {
379 - local -x LIT_PRESERVES_TMP=1
380 - cmake_build check-cxx
381 -}
382 -
383 -# Usage: deps
384 -gen_ldscript() {
385 - local output_format
386 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
387 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
388 -
389 - cat <<-END_LDSCRIPT
390 -/* GNU ld script
391 - Include missing dependencies
392 -*/
393 -${output_format}
394 -GROUP ( $@ )
395 -END_LDSCRIPT
396 -}
397 -
398 -gen_static_ldscript() {
399 - local libdir=$(get_libdir)
400 - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
401 -
402 - # Move it first.
403 - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
404 - # Generate libc++.a ldscript for inclusion of its dependencies so that
405 - # clang++ -stdlib=libc++ -static works out of the box.
406 - local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
407 - # On Linux/glibc it does not link without libpthread or libdl. It is
408 - # fine on FreeBSD.
409 - use elibc_glibc && deps+=" libpthread.a libdl.a"
410 -
411 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
412 -}
413 -
414 -gen_shared_ldscript() {
415 - local libdir=$(get_libdir)
416 - # libsupc++ doesn't have a shared version
417 - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
418 -
419 - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
420 - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
421 -
422 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
423 -}
424 -
425 -multilib_src_install() {
426 - cmake_src_install
427 - gen_shared_ldscript
428 - use static-libs && gen_static_ldscript
429 -}
430 -
431 -pkg_postinst() {
432 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
433 - elog "standard library when using clang."
434 - elog "To use it, instead of libstdc++, use:"
435 - elog " clang++ -stdlib=libc++"
436 - elog "to compile your C++ programs."
437 -}
438
439 diff --git a/sys-libs/libcxx/libcxx-11.0.0_rc6.ebuild b/sys-libs/libcxx/libcxx-11.0.0_rc6.ebuild
440 deleted file mode 100644
441 index 22c6462abd9..00000000000
442 --- a/sys-libs/libcxx/libcxx-11.0.0_rc6.ebuild
443 +++ /dev/null
444 @@ -1,197 +0,0 @@
445 -# Copyright 1999-2020 Gentoo Authors
446 -# Distributed under the terms of the GNU General Public License v2
447 -
448 -EAPI=7
449 -
450 -CMAKE_ECLASS=cmake
451 -PYTHON_COMPAT=( python3_{6..9} )
452 -inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
453 -
454 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
455 -HOMEPAGE="https://libcxx.llvm.org/"
456 -LLVM_COMPONENTS=( libcxx{,abi} llvm/{cmake/modules,utils/llvm-lit} )
457 -llvm.org_set_globals
458 -
459 -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
460 -SLOT="0"
461 -KEYWORDS=""
462 -IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind +static-libs test"
463 -REQUIRED_USE="libunwind? ( libcxxabi )"
464 -RESTRICT="!test? ( test )"
465 -
466 -RDEPEND="
467 - libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
468 - !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )"
469 -# llvm-6 for new lit options
470 -# clang-3.9.0 installs necessary target symlinks unconditionally
471 -# which removes the need for MULTILIB_USEDEP
472 -DEPEND="${RDEPEND}
473 - >=sys-devel/llvm-6"
474 -BDEPEND="
475 - test? ( >=sys-devel/clang-3.9.0
476 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
477 -
478 -DOCS=( CREDITS.TXT )
479 -
480 -python_check_deps() {
481 - has_version "dev-python/lit[${PYTHON_USEDEP}]"
482 -}
483 -
484 -pkg_setup() {
485 - llvm_pkg_setup
486 - use test && python-any-r1_pkg_setup
487 -
488 - if ! use libcxxabi && ! tc-is-gcc ; then
489 - eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
490 - eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
491 - eerror "and try again."
492 - die
493 - fi
494 -}
495 -
496 -src_prepare() {
497 - # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
498 - # out-of-tree build.
499 - eapply "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
500 -
501 - llvm.org_src_prepare
502 -}
503 -
504 -test_compiler() {
505 - $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
506 - <<<'int main() { return 0; }' &>/dev/null
507 -}
508 -
509 -src_configure() {
510 - # note: we need to do this before multilib kicks in since it will
511 - # alter the CHOST
512 - local cxxabi cxxabi_incs
513 - if use libcxxabi; then
514 - cxxabi=libcxxabi
515 - cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
516 - else
517 - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
518 - cxxabi=libsupc++
519 - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
520 - fi
521 -
522 - multilib-minimal_src_configure
523 -}
524 -
525 -multilib_src_configure() {
526 - # we want -lgcc_s for unwinder, and for compiler runtime when using
527 - # gcc, clang with gcc runtime (or any unknown compiler)
528 - local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF
529 - if use libunwind; then
530 - # work-around missing -lunwind upstream
531 - extra_libs+=( -lunwind )
532 - # if we're using libunwind and clang with compiler-rt, we want
533 - # to link to compiler-rt instead of -lgcc_s
534 - if tc-is-clang; then
535 - local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
536 - ${LDFLAGS} -print-libgcc-file-name)
537 - if [[ ${compiler_rt} == *libclang_rt* ]]; then
538 - want_gcc_s=OFF
539 - want_compiler_rt=ON
540 - extra_libs+=( "${compiler_rt}" )
541 - fi
542 - fi
543 - fi
544 -
545 - # bootstrap: cmake is unhappy if compiler can't link to stdlib
546 - local nolib_flags=( -nodefaultlibs -lc )
547 - if ! test_compiler; then
548 - if test_compiler "${nolib_flags[@]}"; then
549 - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
550 - ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}"
551 - fi
552 - fi
553 -
554 - local libdir=$(get_libdir)
555 - local mycmakeargs=(
556 - -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
557 - -DLIBCXX_ENABLE_SHARED=ON
558 - -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
559 - -DLIBCXX_CXX_ABI=${cxxabi}
560 - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
561 - # we're using our own mechanism for generating linker scripts
562 - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
563 - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
564 - -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
565 - -DLIBCXX_INCLUDE_TESTS=$(usex test)
566 - -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt}
567 - -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
568 - )
569 -
570 - if use test; then
571 - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
572 - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
573 -
574 - mycmakeargs+=(
575 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
576 - -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
577 - )
578 - fi
579 - cmake_src_configure
580 -}
581 -
582 -multilib_src_test() {
583 - local -x LIT_PRESERVES_TMP=1
584 - cmake_build check-cxx
585 -}
586 -
587 -# Usage: deps
588 -gen_ldscript() {
589 - local output_format
590 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
591 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
592 -
593 - cat <<-END_LDSCRIPT
594 -/* GNU ld script
595 - Include missing dependencies
596 -*/
597 -${output_format}
598 -GROUP ( $@ )
599 -END_LDSCRIPT
600 -}
601 -
602 -gen_static_ldscript() {
603 - local libdir=$(get_libdir)
604 - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a")
605 -
606 - # Move it first.
607 - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
608 - # Generate libc++.a ldscript for inclusion of its dependencies so that
609 - # clang++ -stdlib=libc++ -static works out of the box.
610 - local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
611 - # On Linux/glibc it does not link without libpthread or libdl. It is
612 - # fine on FreeBSD.
613 - use elibc_glibc && deps+=" libpthread.a libdl.a"
614 -
615 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
616 -}
617 -
618 -gen_shared_ldscript() {
619 - local libdir=$(get_libdir)
620 - # libsupc++ doesn't have a shared version
621 - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a")
622 -
623 - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
624 - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
625 -
626 - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
627 -}
628 -
629 -multilib_src_install() {
630 - cmake_src_install
631 - gen_shared_ldscript
632 - use static-libs && gen_static_ldscript
633 -}
634 -
635 -pkg_postinst() {
636 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
637 - elog "standard library when using clang."
638 - elog "To use it, instead of libstdc++, use:"
639 - elog " clang++ -stdlib=libc++"
640 - elog "to compile your C++ programs."
641 -}