1 |
commit: a7c2a2d02fdd1a6fc14b02d1dd2e6a8538c6ce14 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 14 14:51:33 2023 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 14 19:43:34 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7c2a2d0 |
7 |
|
8 |
sys-libs/llvm-libunwind: Add 17.0.0_pre20230314 snapshot |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/llvm-libunwind/Manifest | 1 + |
13 |
.../llvm-libunwind-17.0.0_pre20230314.ebuild | 123 +++++++++++++++++++++ |
14 |
2 files changed, 124 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest |
17 |
index 15bdf7aeec4f..ac2c7f3d69fc 100644 |
18 |
--- a/sys-libs/llvm-libunwind/Manifest |
19 |
+++ b/sys-libs/llvm-libunwind/Manifest |
20 |
@@ -7,3 +7,4 @@ DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f7141 |
21 |
DIST llvm-project-16.0.0rc4.src.tar.xz 117930024 BLAKE2B 55cf032ad3ba52d2af0942fe1c627319ae95b466122d04b24a917c33e29139fae546d92c375715600190c02426b798803ead0ab7a97d86960cf98fca80e8815c SHA512 8d628205c5b93fe6683b67b97b5c7f98bae945bd87cccebcdac00ddd4362108bd171f077a5196242be0fb909c795592b34bfa1c96c50a744fb68f287fd9781cc |
22 |
DIST llvm-project-16.0.0rc4.src.tar.xz.sig 566 BLAKE2B bfcf39070f32e16cfeae699d95d06f184b1331c3af403340c31cc5a973a3bb1faec0b6342445176cebed5819ddf68e4abfdaa8542ec425b1c822fc8c03c03349 SHA512 2af72e3d771e2361873007a944dcccfe81fbdbc3025a2101e03cbc15f1a173d39ceb94c4ae8966b1d7564bf004ee9a5ffa032e2334c0cf7154aea1090d04b00f |
23 |
DIST llvm-project-2708869801ae00f4681f6b2d9d69b25b3fce26b6.tar.gz 180523586 BLAKE2B cf918d1e23f922d201a44531c9765b7d8ec2b3b8499ea7954845abcd5fa2687e85b3a34819a583c4f4a6d6e1baa49dbac0b4450cd6b9b322b0f13c88cd7da93c SHA512 18cb00e93d819993a925ae0467d382bc952d82c1eb92dbbb5bb3cdf87043269948670713734ddc3ea4ec50544e54dd11b6747496f7eaa02479374ab9ad075aa5 |
24 |
+DIST llvm-project-4bf004e07e2b9d6e04e3f33e1b02628c679de664.tar.gz 180304467 BLAKE2B 6750855453b575eb8fcc861d5b24b144497bba62df9b9292ac586cf340e04b2b58290fe9df6d89142f29b56aa37ddeb3bd11cc3337e4dc985a4487954d1e2ffa SHA512 d8a87064ba0f92967df019e9345222b87cda81852a9599902cedc4a49ec7d9e2175c972b7fa6d19920489c1d309822f9c31c23bdce0376a8d40c71d57bcd5068 |
25 |
|
26 |
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230314.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230314.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..6ffa6c4f81b8 |
29 |
--- /dev/null |
30 |
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-17.0.0_pre20230314.ebuild |
31 |
@@ -0,0 +1,123 @@ |
32 |
+# Copyright 1999-2023 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{9..11} ) |
38 |
+inherit cmake-multilib flag-o-matic llvm llvm.org python-any-r1 \ |
39 |
+ toolchain-funcs |
40 |
+ |
41 |
+DESCRIPTION="C++ runtime stack unwinder from LLVM" |
42 |
+HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html" |
43 |
+ |
44 |
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="" |
47 |
+IUSE="+clang debug static-libs test" |
48 |
+REQUIRED_USE="test? ( clang )" |
49 |
+RESTRICT="!test? ( test )" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ !sys-libs/libunwind |
53 |
+" |
54 |
+DEPEND=" |
55 |
+ sys-devel/llvm:${LLVM_MAJOR} |
56 |
+" |
57 |
+BDEPEND=" |
58 |
+ clang? ( |
59 |
+ sys-devel/clang:${LLVM_MAJOR} |
60 |
+ ) |
61 |
+ !test? ( |
62 |
+ ${PYTHON_DEPS} |
63 |
+ ) |
64 |
+ test? ( |
65 |
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
66 |
+ ) |
67 |
+" |
68 |
+ |
69 |
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake ) |
70 |
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit ) |
71 |
+llvm.org_set_globals |
72 |
+ |
73 |
+python_check_deps() { |
74 |
+ use test || return 0 |
75 |
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]" |
76 |
+} |
77 |
+ |
78 |
+pkg_setup() { |
79 |
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup |
80 |
+ python-any-r1_pkg_setup |
81 |
+} |
82 |
+ |
83 |
+multilib_src_configure() { |
84 |
+ local libdir=$(get_libdir) |
85 |
+ |
86 |
+ # https://github.com/llvm/llvm-project/issues/56825 |
87 |
+ # also separately bug #863917 |
88 |
+ filter-lto |
89 |
+ |
90 |
+ if use clang; then |
91 |
+ local -x CC=${CHOST}-clang |
92 |
+ local -x CXX=${CHOST}-clang++ |
93 |
+ strip-unsupported-flags |
94 |
+ fi |
95 |
+ |
96 |
+ # link to compiler-rt |
97 |
+ # https://github.com/gentoo/gentoo/pull/21516 |
98 |
+ local use_compiler_rt=OFF |
99 |
+ [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON |
100 |
+ |
101 |
+ local mycmakeargs=( |
102 |
+ -DCMAKE_CXX_COMPILER_TARGET="${CHOST}" |
103 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
104 |
+ -DLLVM_ENABLE_RUNTIMES="libunwind" |
105 |
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib} |
106 |
+ -DLLVM_INCLUDE_TESTS=OFF |
107 |
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug) |
108 |
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs) |
109 |
+ -DLIBUNWIND_INCLUDE_TESTS=$(usex test) |
110 |
+ -DLIBUNWIND_INSTALL_HEADERS=ON |
111 |
+ |
112 |
+ # support non-native unwinding; given it's small enough, |
113 |
+ # enable it unconditionally |
114 |
+ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON |
115 |
+ |
116 |
+ # avoid dependency on libgcc_s if compiler-rt is used |
117 |
+ -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt} |
118 |
+ ) |
119 |
+ if use test; then |
120 |
+ mycmakeargs+=( |
121 |
+ -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx" |
122 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
123 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
124 |
+ -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" |
125 |
+ |
126 |
+ -DLIBCXXABI_LIBDIR_SUFFIX= |
127 |
+ -DLIBCXXABI_ENABLE_SHARED=OFF |
128 |
+ -DLIBCXXABI_ENABLE_STATIC=ON |
129 |
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON |
130 |
+ -DLIBCXXABI_INCLUDE_TESTS=OFF |
131 |
+ |
132 |
+ -DLIBCXX_LIBDIR_SUFFIX= |
133 |
+ -DLIBCXX_ENABLE_SHARED=OFF |
134 |
+ -DLIBCXX_ENABLE_STATIC=ON |
135 |
+ -DLIBCXX_CXX_ABI=libcxxabi |
136 |
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF |
137 |
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) |
138 |
+ -DLIBCXX_HAS_GCC_S_LIB=OFF |
139 |
+ -DLIBCXX_INCLUDE_TESTS=OFF |
140 |
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF |
141 |
+ ) |
142 |
+ fi |
143 |
+ |
144 |
+ cmake_src_configure |
145 |
+} |
146 |
+ |
147 |
+multilib_src_test() { |
148 |
+ local -x LIT_PRESERVES_TMP=1 |
149 |
+ cmake_build check-unwind |
150 |
+} |
151 |
+ |
152 |
+multilib_src_install() { |
153 |
+ DESTDIR=${D} cmake_build install-unwind |
154 |
+} |