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/libcxxabi/
Date: Wed, 02 Mar 2022 09:09:10
Message-Id: 1646212138.4f4f3663e99c2c7187a5623e9544b432a2a3c690.mgorny@gentoo
1 commit: 4f4f3663e99c2c7187a5623e9544b432a2a3c690
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 2 09:02:31 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 2 09:08:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f4f3663
7
8 sys-libs/libcxxabi: Bump to 14.0.0_rc2
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/libcxxabi/Manifest | 1 +
13 sys-libs/libcxxabi/libcxxabi-14.0.0_rc2.ebuild | 124 +++++++++++++++++++++++++
14 2 files changed, 125 insertions(+)
15
16 diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
17 index 796ca2103854..f45edaa5ba87 100644
18 --- a/sys-libs/libcxxabi/Manifest
19 +++ b/sys-libs/libcxxabi/Manifest
20 @@ -3,3 +3,4 @@ DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f6
21 DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
22 DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
23 DIST llvmorg-14.0.0-rc1.tar.gz 158019694 BLAKE2B c0494bfa5cc92be73d2a2736ce04a1ce11003aba477393639a6fc1b4114bb604ddd1929f288f831997693d2d3d7feb9eb7aa4bc1a2eb60d4b01777314ab90973 SHA512 62aac6a033ef0e321aef5060dcc61eb721b115a9cc1b7570497f72183d9e70a66b5910e90df14428bf56d33a44d4582c919e19f4477c0cfb3209e249b53fe534
24 +DIST llvmorg-14.0.0-rc2.tar.gz 158069989 BLAKE2B 06dcf5d82cd100bd792eadb3816cb297a11dc64dc8b699ccb2eac8ef0da4f10a24ba1984376427b638def6c8c8ae5bc9562e1cc30281fc55f044aa2a9657fc81 SHA512 c77d8c6db2ee6536f7e980465d5a3eb34403c6529e2012a4778ce76a559a6d639cf4c5ec84f965287d4b0739a73dc3e65d7deb27815d74c35e823839e579d2a3
25
26 diff --git a/sys-libs/libcxxabi/libcxxabi-14.0.0_rc2.ebuild b/sys-libs/libcxxabi/libcxxabi-14.0.0_rc2.ebuild
27 new file mode 100644
28 index 000000000000..2bd92bc0287d
29 --- /dev/null
30 +++ b/sys-libs/libcxxabi/libcxxabi-14.0.0_rc2.ebuild
31 @@ -0,0 +1,124 @@
32 +# Copyright 1999-2022 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=""
47 +IUSE="+libunwind static-libs test"
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 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 + -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
110 + )
111 + if use test; then
112 + local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
113 + [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
114 +
115 + mycmakeargs+=(
116 + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
117 + -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
118 + -DPython3_EXECUTABLE="${PYTHON}"
119 + )
120 + fi
121 + cmake_src_configure
122 +}
123 +
124 +wrap_libcxx() {
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 + -DLIBCXX_TARGET_TRIPLE="${CHOST}"
139 + )
140 +
141 + "${@}"
142 +}
143 +
144 +multilib_src_test() {
145 + wrap_libcxx cmake_src_compile
146 + mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/lib/" || die
147 +
148 + local -x LIT_PRESERVES_TMP=1
149 + cmake_build check-cxxabi
150 +}
151 +
152 +multilib_src_install_all() {
153 + insinto /usr/include/libcxxabi
154 + doins -r include/.
155 +}