1 |
commit: b631f2aef47816fea1cde6de176d5fcefe3e9505 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 1 12:36:38 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 1 13:26:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b631f2ae |
7 |
|
8 |
sys-libs/libcxxabi: Bump to 13.0.0 (final) |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/libcxxabi/Manifest | 1 + |
13 |
sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild | 123 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 124 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest |
17 |
index 23bb7af47e1..743ab9d8e74 100644 |
18 |
--- a/sys-libs/libcxxabi/Manifest |
19 |
+++ b/sys-libs/libcxxabi/Manifest |
20 |
@@ -4,3 +4,4 @@ DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f6 |
21 |
DIST llvmorg-13.0.0-rc2.tar.gz 147267736 BLAKE2B 153bf7320f2aa911112d366ffc79f7110cb04f135c2a8b176c263f0a75eb768206d9bd462893d45504b0e58aa9e127fdcafb02300eab1666e4616aa654d457dd SHA512 a01baf3eaa02f02af42bfcf6dcf24f166351bf1c09601495617c81e41def23210573bad40a344270f40c5deb881d06863536abac2a6481930766a6a56335fb44 |
22 |
DIST llvmorg-13.0.0-rc3.tar.gz 147281901 BLAKE2B 640065a2f32dc48edf084d776cb6b950fae86c2a204999e2eec67f93b57615df40adec19785099b0ef2fe11837c3304794ec3585289a5b5051a557618c63c749 SHA512 1401d5a4d6bb5c930d74b9cfbc8e792872f721aab7d7f0c819e2ba5cf47fb818d160c1f71784fba69827f3c9b7414aa91a585d2b813c1851b4799f9d62cebc46 |
23 |
DIST llvmorg-13.0.0-rc4.tar.gz 147286367 BLAKE2B a43c54b8bb379b0374f99ae07066d7ba4ae2a83dfdb61390101c736f91dc44aa07a88778551aaaf903033562b2a0a863ea6b27392b700c9cddc74e2c7899cad1 SHA512 8ccaaea21ec4fe3c4b4446d3a7cae36a47ed196f407d341da45824bcefefffd3c412c0c5c27670ceaba1458bc53107273f9d3aec2de261b6b82c6d209b45b14d |
24 |
+DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2 |
25 |
|
26 |
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..4c3c7882da7 |
29 |
--- /dev/null |
30 |
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild |
31 |
@@ -0,0 +1,123 @@ |
32 |
+# Copyright 1999-2021 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+CMAKE_ECLASS=cmake |
38 |
+PYTHON_COMPAT=( python3_{8..10} ) |
39 |
+inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="Low level support for a standard C++ library" |
42 |
+HOMEPAGE="https://libcxxabi.llvm.org/" |
43 |
+ |
44 |
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~x64-macos" |
47 |
+IUSE="+libunwind static-libs test elibc_musl" |
48 |
+RESTRICT="!test? ( test )" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ libunwind? ( |
52 |
+ || ( |
53 |
+ >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] |
54 |
+ >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}] |
55 |
+ ) |
56 |
+ )" |
57 |
+# llvm-6 for new lit options |
58 |
+DEPEND="${RDEPEND} |
59 |
+ >=sys-devel/llvm-6" |
60 |
+BDEPEND=" |
61 |
+ test? ( >=sys-devel/clang-3.9.0 |
62 |
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
63 |
+ )" |
64 |
+ |
65 |
+LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake ) |
66 |
+llvm.org_set_globals |
67 |
+ |
68 |
+python_check_deps() { |
69 |
+ has_version "dev-python/lit[${PYTHON_USEDEP}]" |
70 |
+} |
71 |
+ |
72 |
+pkg_setup() { |
73 |
+ # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix |
74 |
+ # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup. |
75 |
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then |
76 |
+ llvm_pkg_setup |
77 |
+ fi |
78 |
+ use test && python-any-r1_pkg_setup |
79 |
+} |
80 |
+ |
81 |
+multilib_src_configure() { |
82 |
+ # we need a configured libc++ for __config_site |
83 |
+ wrap_libcxx cmake_src_configure |
84 |
+ wrap_libcxx cmake_build generate-cxx-headers |
85 |
+ |
86 |
+ # link against compiler-rt instead of libgcc if we are using clang with libunwind |
87 |
+ local want_compiler_rt=OFF |
88 |
+ if use libunwind && tc-is-clang; then |
89 |
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \ |
90 |
+ ${LDFLAGS} -print-libgcc-file-name) |
91 |
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then |
92 |
+ want_compiler_rt=ON |
93 |
+ fi |
94 |
+ fi |
95 |
+ |
96 |
+ local libdir=$(get_libdir) |
97 |
+ local mycmakeargs=( |
98 |
+ -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib} |
99 |
+ -DLIBCXXABI_ENABLE_SHARED=ON |
100 |
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs) |
101 |
+ -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind) |
102 |
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test) |
103 |
+ -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt} |
104 |
+ |
105 |
+ -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1 |
106 |
+ # upstream is omitting standard search path for this |
107 |
+ # probably because gcc & clang are bundling their own unwind.h |
108 |
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include |
109 |
+ ) |
110 |
+ if use test; then |
111 |
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) |
112 |
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" |
113 |
+ |
114 |
+ mycmakeargs+=( |
115 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
116 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}" |
117 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
118 |
+ ) |
119 |
+ fi |
120 |
+ cmake_src_configure |
121 |
+} |
122 |
+ |
123 |
+wrap_libcxx() { |
124 |
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)" |
125 |
+ local CMAKE_USE_DIR=${WORKDIR}/libcxx |
126 |
+ local BUILD_DIR=${BUILD_DIR}/libcxx |
127 |
+ local mycmakeargs=( |
128 |
+ -DLIBCXX_LIBDIR_SUFFIX= |
129 |
+ -DLIBCXX_ENABLE_SHARED=OFF |
130 |
+ -DLIBCXX_ENABLE_STATIC=ON |
131 |
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF |
132 |
+ -DLIBCXX_CXX_ABI=libcxxabi |
133 |
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include |
134 |
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
135 |
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
136 |
+ -DLIBCXX_HAS_GCC_S_LIB=OFF |
137 |
+ -DLIBCXX_INCLUDE_TESTS=OFF |
138 |
+ ) |
139 |
+ |
140 |
+ "${@}" |
141 |
+} |
142 |
+ |
143 |
+multilib_src_test() { |
144 |
+ wrap_libcxx cmake_src_compile |
145 |
+ mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die |
146 |
+ |
147 |
+ local -x LIT_PRESERVES_TMP=1 |
148 |
+ cmake_build check-cxxabi |
149 |
+} |
150 |
+ |
151 |
+multilib_src_install_all() { |
152 |
+ insinto /usr/include/libcxxabi |
153 |
+ doins -r include/. |
154 |
+} |