1 |
commit: 31bfa9f626e59003a204a27adb1e82e9496f7023 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 4 18:12:51 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 4 18:39:00 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31bfa9f6 |
7 |
|
8 |
sys-libs/libcxx: Remove 10.0.0rc[12] |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/libcxx/Manifest | 2 - |
13 |
sys-libs/libcxx/libcxx-10.0.0_rc1.ebuild | 211 ------------------------------- |
14 |
sys-libs/libcxx/libcxx-10.0.0_rc2.ebuild | 206 ------------------------------ |
15 |
3 files changed, 419 deletions(-) |
16 |
|
17 |
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest |
18 |
index 19031a3bc4e..581f9cb8a99 100644 |
19 |
--- a/sys-libs/libcxx/Manifest |
20 |
+++ b/sys-libs/libcxx/Manifest |
21 |
@@ -1,6 +1,4 @@ |
22 |
DIST libcxx-7.1.0.src.tar.xz 1638448 BLAKE2B eca192e03f839f4323e3c37beba2e6daaf935d4e784e0bc835a4d2c3ce0790f5539bdca0466feafd668d7c6675b11b7fe14d9adb680c46fd7b28b42a3b423219 SHA512 925ce5093445f84dc17d5b1610e4297ef3606b254b7350c50f88ba042fcca62125ffd97d21cb612707d5e9511267634ca1779619199f95ce819e5f5c0c2b55d5 |
23 |
DIST libcxx-8.0.1.src.tar.xz 1739524 BLAKE2B 6e641cb6bda0de12c8408d3ab33f627389ac014aa65b3391c870aa96ffd347784e6b70b953bd1ee8eba56554e0f78a723ab77b9dba5f85e6219e2b95ca50c160 SHA512 75749d08b2b343c6f5f9aefb04be63e42f6d12efc51101d3647ed6f70c7a6d050afb3ab2f3636eae78cb523f5844de67b960a7a3145ed89ab0c7015deb14921e |
24 |
-DIST llvmorg-10.0.0-rc1.tar.gz 120755822 BLAKE2B a729d37d96ba498cb865c6f708734dccb796b2caabb69167b9aa3b0e12c788f2a5980a048b99d5603da3d26af909fb31f406b4f4743cabae56c45f829a7bf695 SHA512 27137fc700971147c00ded6787eaae9f0bcf98c938fe227a5a559b38d983736f3d086f4ff6772d802c5f48a7d97a97c293261e4af88fcb5a720693b9cb5a4f02 |
25 |
-DIST llvmorg-10.0.0-rc2.tar.gz 120795019 BLAKE2B 6e701eddbd2313e777c7b37dff8455a08d3c599d01055b60afc0319373d4709deb429aac6bf9e80c4d2e2ab8ade03bf5b398b6ccd8882e4bde608d10cdbf2284 SHA512 ee571c9258a2d9fc411964f56b0b92b2e7134349ed21dbe7963eb61ef65da506e0c4f7c69259a3b6cecec23f55d24636608287ee4457ee667031e141f8f09aae |
26 |
DIST llvmorg-10.0.0-rc3.tar.gz 120814170 BLAKE2B 432fe0c1e74d3020a269a256e6e456cbfa0b7166dd3f86df6caf3a55e1931c022285fe8afdc4d8998c729c5471acf5308abb336782ddec2ef9b0f58d1ccb5a3c SHA512 aad1df86063612d20c48ea7046940330fe2ac572a146be22ff71d9e65fa3438184cb39a2533fc6afd1e74df26909a9f0d24ebcd7d62e74728cfd81e447f2ffbf |
27 |
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 |
28 |
|
29 |
diff --git a/sys-libs/libcxx/libcxx-10.0.0_rc1.ebuild b/sys-libs/libcxx/libcxx-10.0.0_rc1.ebuild |
30 |
deleted file mode 100644 |
31 |
index 53296785de7..00000000000 |
32 |
--- a/sys-libs/libcxx/libcxx-10.0.0_rc1.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,211 +0,0 @@ |
35 |
-# Copyright 1999-2020 Gentoo Authors |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=7 |
39 |
- |
40 |
-PYTHON_COMPAT=( python3_{6,7} ) |
41 |
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \ |
42 |
- toolchain-funcs |
43 |
- |
44 |
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
45 |
-HOMEPAGE="https://libcxx.llvm.org/" |
46 |
-LLVM_COMPONENTS=( libcxx ) |
47 |
-llvm.org_set_globals |
48 |
- |
49 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
50 |
-SLOT="0" |
51 |
-KEYWORDS="" |
52 |
-IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test" |
53 |
-REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) ) |
54 |
- ?? ( libcxxabi libcxxrt )" |
55 |
-RESTRICT="!test? ( test )" |
56 |
- |
57 |
-RDEPEND=" |
58 |
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) |
59 |
- libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) |
60 |
- !libcxxabi? ( !libcxxrt? ( >=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 |
-PATCHES=( |
73 |
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a |
74 |
- # out-of-tree build. |
75 |
- "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch" |
76 |
-) |
77 |
- |
78 |
-# least intrusive of all |
79 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
80 |
- |
81 |
-python_check_deps() { |
82 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
83 |
-} |
84 |
- |
85 |
-pkg_setup() { |
86 |
- llvm_pkg_setup |
87 |
- use test && python-any-r1_pkg_setup |
88 |
- |
89 |
- if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then |
90 |
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other" |
91 |
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++" |
92 |
- eerror "and try again." |
93 |
- die |
94 |
- fi |
95 |
- if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then |
96 |
- eerror "${PN} needs to be built with gcc-4.7 or later (or other" |
97 |
- eerror "conformant compilers). Please use gcc-config to switch to" |
98 |
- eerror "gcc-4.7 or later version." |
99 |
- die |
100 |
- fi |
101 |
-} |
102 |
- |
103 |
-test_compiler() { |
104 |
- $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \ |
105 |
- <<<'int main() { return 0; }' &>/dev/null |
106 |
-} |
107 |
- |
108 |
-src_configure() { |
109 |
- # note: we need to do this before multilib kicks in since it will |
110 |
- # alter the CHOST |
111 |
- local cxxabi cxxabi_incs |
112 |
- if use libcxxabi; then |
113 |
- cxxabi=libcxxabi |
114 |
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi" |
115 |
- elif use libcxxrt; then |
116 |
- cxxabi=libcxxrt |
117 |
- cxxabi_incs="${EPREFIX}/usr/include/libcxxrt" |
118 |
- else |
119 |
- local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)" |
120 |
- cxxabi=libsupc++ |
121 |
- cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}" |
122 |
- fi |
123 |
- |
124 |
- multilib-minimal_src_configure |
125 |
-} |
126 |
- |
127 |
-multilib_src_configure() { |
128 |
- # we want -lgcc_s for unwinder, and for compiler runtime when using |
129 |
- # gcc, clang with gcc runtime (or any unknown compiler) |
130 |
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF |
131 |
- if use libunwind; then |
132 |
- # work-around missing -lunwind upstream |
133 |
- extra_libs+=( -lunwind ) |
134 |
- # if we're using libunwind and clang with compiler-rt, we want |
135 |
- # to link to compiler-rt instead of -lgcc_s |
136 |
- if tc-is-clang; then |
137 |
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
138 |
- ${LDFLAGS} -print-libgcc-file-name) |
139 |
- if [[ ${compiler_rt} == *libclang_rt* ]]; then |
140 |
- want_gcc_s=OFF |
141 |
- want_compiler_rt=ON |
142 |
- extra_libs+=( "${compiler_rt}" ) |
143 |
- fi |
144 |
- fi |
145 |
- fi |
146 |
- |
147 |
- # bootstrap: cmake is unhappy if compiler can't link to stdlib |
148 |
- local nolib_flags=( -nodefaultlibs -lc ) |
149 |
- if ! test_compiler; then |
150 |
- if test_compiler "${nolib_flags[@]}"; then |
151 |
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
152 |
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}" |
153 |
- fi |
154 |
- fi |
155 |
- |
156 |
- local libdir=$(get_libdir) |
157 |
- local mycmakeargs=( |
158 |
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib} |
159 |
- -DLIBCXX_ENABLE_SHARED=ON |
160 |
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs) |
161 |
- -DLIBCXX_CXX_ABI=${cxxabi} |
162 |
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} |
163 |
- # we're using our own mechanism for generating linker scripts |
164 |
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
165 |
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
166 |
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s} |
167 |
- -DLIBCXX_INCLUDE_TESTS=$(usex test) |
168 |
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt} |
169 |
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}" |
170 |
- ) |
171 |
- |
172 |
- if use test; then |
173 |
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) |
174 |
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")} |
175 |
- |
176 |
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" |
177 |
- |
178 |
- mycmakeargs+=( |
179 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
180 |
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" |
181 |
- ) |
182 |
- fi |
183 |
- cmake-utils_src_configure |
184 |
-} |
185 |
- |
186 |
-multilib_src_test() { |
187 |
- local -x LIT_PRESERVES_TMP=1 |
188 |
- cmake-utils_src_make check-libcxx |
189 |
-} |
190 |
- |
191 |
-# Usage: deps |
192 |
-gen_ldscript() { |
193 |
- local output_format |
194 |
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |
195 |
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" |
196 |
- |
197 |
- cat <<-END_LDSCRIPT |
198 |
-/* GNU ld script |
199 |
- Include missing dependencies |
200 |
-*/ |
201 |
-${output_format} |
202 |
-GROUP ( $@ ) |
203 |
-END_LDSCRIPT |
204 |
-} |
205 |
- |
206 |
-gen_static_ldscript() { |
207 |
- local libdir=$(get_libdir) |
208 |
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")") |
209 |
- |
210 |
- # Move it first. |
211 |
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die |
212 |
- # Generate libc++.a ldscript for inclusion of its dependencies so that |
213 |
- # clang++ -stdlib=libc++ -static works out of the box. |
214 |
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)" |
215 |
- # On Linux/glibc it does not link without libpthread or libdl. It is |
216 |
- # fine on FreeBSD. |
217 |
- use elibc_glibc && deps+=" libpthread.a libdl.a" |
218 |
- |
219 |
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die |
220 |
-} |
221 |
- |
222 |
-gen_shared_ldscript() { |
223 |
- local libdir=$(get_libdir) |
224 |
- # libsupc++ doesn't have a shared version |
225 |
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")") |
226 |
- |
227 |
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die |
228 |
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)" |
229 |
- |
230 |
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die |
231 |
-} |
232 |
- |
233 |
-multilib_src_install() { |
234 |
- cmake-utils_src_install |
235 |
- gen_shared_ldscript |
236 |
- use static-libs && gen_static_ldscript |
237 |
-} |
238 |
- |
239 |
-pkg_postinst() { |
240 |
- elog "This package (${PN}) is mainly intended as a replacement for the C++" |
241 |
- elog "standard library when using clang." |
242 |
- elog "To use it, instead of libstdc++, use:" |
243 |
- elog " clang++ -stdlib=libc++" |
244 |
- elog "to compile your C++ programs." |
245 |
-} |
246 |
|
247 |
diff --git a/sys-libs/libcxx/libcxx-10.0.0_rc2.ebuild b/sys-libs/libcxx/libcxx-10.0.0_rc2.ebuild |
248 |
deleted file mode 100644 |
249 |
index 5a3729e82ad..00000000000 |
250 |
--- a/sys-libs/libcxx/libcxx-10.0.0_rc2.ebuild |
251 |
+++ /dev/null |
252 |
@@ -1,206 +0,0 @@ |
253 |
-# Copyright 1999-2020 Gentoo Authors |
254 |
-# Distributed under the terms of the GNU General Public License v2 |
255 |
- |
256 |
-EAPI=7 |
257 |
- |
258 |
-PYTHON_COMPAT=( python3_{6,7} ) |
259 |
-inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \ |
260 |
- toolchain-funcs |
261 |
- |
262 |
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11" |
263 |
-HOMEPAGE="https://libcxx.llvm.org/" |
264 |
-LLVM_COMPONENTS=( libcxx ) |
265 |
-llvm.org_set_globals |
266 |
- |
267 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
268 |
-SLOT="0" |
269 |
-KEYWORDS="" |
270 |
-IUSE="elibc_glibc elibc_musl +libcxxabi +libunwind +static-libs test" |
271 |
-REQUIRED_USE="libunwind? ( libcxxabi )" |
272 |
-RESTRICT="!test? ( test )" |
273 |
- |
274 |
-RDEPEND=" |
275 |
- libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) |
276 |
- !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )" |
277 |
-# llvm-6 for new lit options |
278 |
-# clang-3.9.0 installs necessary target symlinks unconditionally |
279 |
-# which removes the need for MULTILIB_USEDEP |
280 |
-DEPEND="${RDEPEND} |
281 |
- >=sys-devel/llvm-6" |
282 |
-BDEPEND=" |
283 |
- test? ( >=sys-devel/clang-3.9.0 |
284 |
- $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" |
285 |
- |
286 |
-DOCS=( CREDITS.TXT ) |
287 |
- |
288 |
-PATCHES=( |
289 |
- # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a |
290 |
- # out-of-tree build. |
291 |
- "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch" |
292 |
-) |
293 |
- |
294 |
-# least intrusive of all |
295 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
296 |
- |
297 |
-python_check_deps() { |
298 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
299 |
-} |
300 |
- |
301 |
-pkg_setup() { |
302 |
- llvm_pkg_setup |
303 |
- use test && python-any-r1_pkg_setup |
304 |
- |
305 |
- if ! use libcxxabi && ! tc-is-gcc ; then |
306 |
- eerror "To build ${PN} against libsupc++, you have to use gcc. Other" |
307 |
- eerror "compilers are not supported. Please set CC=gcc and CXX=g++" |
308 |
- eerror "and try again." |
309 |
- die |
310 |
- fi |
311 |
- if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then |
312 |
- eerror "${PN} needs to be built with gcc-4.7 or later (or other" |
313 |
- eerror "conformant compilers). Please use gcc-config to switch to" |
314 |
- eerror "gcc-4.7 or later version." |
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=libcxxabi |
330 |
- cxxabi_incs="${EPREFIX}/usr/include/libcxxabi" |
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 |
- # we want -lgcc_s for unwinder, and for compiler runtime when using |
342 |
- # gcc, clang with gcc runtime (or any unknown compiler) |
343 |
- local extra_libs=() want_gcc_s=ON want_compiler_rt=OFF |
344 |
- if use libunwind; then |
345 |
- # work-around missing -lunwind upstream |
346 |
- extra_libs+=( -lunwind ) |
347 |
- # if we're using libunwind and clang with compiler-rt, we want |
348 |
- # to link to compiler-rt instead of -lgcc_s |
349 |
- if tc-is-clang; then |
350 |
- local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
351 |
- ${LDFLAGS} -print-libgcc-file-name) |
352 |
- if [[ ${compiler_rt} == *libclang_rt* ]]; then |
353 |
- want_gcc_s=OFF |
354 |
- want_compiler_rt=ON |
355 |
- extra_libs+=( "${compiler_rt}" ) |
356 |
- fi |
357 |
- fi |
358 |
- fi |
359 |
- |
360 |
- # bootstrap: cmake is unhappy if compiler can't link to stdlib |
361 |
- local nolib_flags=( -nodefaultlibs -lc ) |
362 |
- if ! test_compiler; then |
363 |
- if test_compiler "${nolib_flags[@]}"; then |
364 |
- local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" |
365 |
- ewarn "${CXX} seems to lack runtime, trying with ${nolib_flags[*]}" |
366 |
- fi |
367 |
- fi |
368 |
- |
369 |
- local libdir=$(get_libdir) |
370 |
- local mycmakeargs=( |
371 |
- -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib} |
372 |
- -DLIBCXX_ENABLE_SHARED=ON |
373 |
- -DLIBCXX_ENABLE_STATIC=$(usex static-libs) |
374 |
- -DLIBCXX_CXX_ABI=${cxxabi} |
375 |
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} |
376 |
- # we're using our own mechanism for generating linker scripts |
377 |
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
378 |
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
379 |
- -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s} |
380 |
- -DLIBCXX_INCLUDE_TESTS=$(usex test) |
381 |
- -DLIBCXX_USE_COMPILER_RT=${want_compiler_rt} |
382 |
- -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}" |
383 |
- ) |
384 |
- |
385 |
- if use test; then |
386 |
- local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) |
387 |
- local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")} |
388 |
- |
389 |
- [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" |
390 |
- |
391 |
- mycmakeargs+=( |
392 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
393 |
- -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" |
394 |
- ) |
395 |
- fi |
396 |
- cmake-utils_src_configure |
397 |
-} |
398 |
- |
399 |
-multilib_src_test() { |
400 |
- local -x LIT_PRESERVES_TMP=1 |
401 |
- cmake-utils_src_make check-libcxx |
402 |
-} |
403 |
- |
404 |
-# Usage: deps |
405 |
-gen_ldscript() { |
406 |
- local output_format |
407 |
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') |
408 |
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )" |
409 |
- |
410 |
- cat <<-END_LDSCRIPT |
411 |
-/* GNU ld script |
412 |
- Include missing dependencies |
413 |
-*/ |
414 |
-${output_format} |
415 |
-GROUP ( $@ ) |
416 |
-END_LDSCRIPT |
417 |
-} |
418 |
- |
419 |
-gen_static_ldscript() { |
420 |
- local libdir=$(get_libdir) |
421 |
- local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "libsupc++.a") |
422 |
- |
423 |
- # Move it first. |
424 |
- mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die |
425 |
- # Generate libc++.a ldscript for inclusion of its dependencies so that |
426 |
- # clang++ -stdlib=libc++ -static works out of the box. |
427 |
- local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)" |
428 |
- # On Linux/glibc it does not link without libpthread or libdl. It is |
429 |
- # fine on FreeBSD. |
430 |
- use elibc_glibc && deps+=" libpthread.a libdl.a" |
431 |
- |
432 |
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die |
433 |
-} |
434 |
- |
435 |
-gen_shared_ldscript() { |
436 |
- local libdir=$(get_libdir) |
437 |
- # libsupc++ doesn't have a shared version |
438 |
- local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "libsupc++.a") |
439 |
- |
440 |
- mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die |
441 |
- local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)" |
442 |
- |
443 |
- gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die |
444 |
-} |
445 |
- |
446 |
-multilib_src_install() { |
447 |
- cmake-utils_src_install |
448 |
- gen_shared_ldscript |
449 |
- use static-libs && gen_static_ldscript |
450 |
-} |
451 |
- |
452 |
-pkg_postinst() { |
453 |
- elog "This package (${PN}) is mainly intended as a replacement for the C++" |
454 |
- elog "standard library when using clang." |
455 |
- elog "To use it, instead of libstdc++, use:" |
456 |
- elog " clang++ -stdlib=libc++" |
457 |
- elog "to compile your C++ programs." |
458 |
-} |