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