From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1385266-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id BE91B15808B
	for <garchives@archives.gentoo.org>; Wed, 13 Apr 2022 21:43:50 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id AA970E0969;
	Wed, 13 Apr 2022 21:43:44 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 39C41E0923
	for <gentoo-commits@lists.gentoo.org>; Wed, 13 Apr 2022 21:43:44 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4286E341E61
	for <gentoo-commits@lists.gentoo.org>; Wed, 13 Apr 2022 21:43:42 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A9FB63B5
	for <gentoo-commits@lists.gentoo.org>; Wed, 13 Apr 2022 21:43:39 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1649886182.6fd52b3f5f60c305c87e025a0487c9d7cf9ed996.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/llvm-libunwind/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-libs/llvm-libunwind/Manifest sys-libs/llvm-libunwind/llvm-libunwind-14.0.1.ebuild
X-VCS-Directories: sys-libs/llvm-libunwind/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 6fd52b3f5f60c305c87e025a0487c9d7cf9ed996
X-VCS-Branch: master
Date: Wed, 13 Apr 2022 21:43:39 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 275dace6-9334-4c99-8bb1-77d211b401b0
X-Archives-Hash: 458c340d6d97842d2f09bafb7044ac1c

commit:     6fd52b3f5f60c305c87e025a0487c9d7cf9ed996
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 13 20:20:45 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 21:43:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fd52b3f

sys-libs/llvm-libunwind: Bump to 14.0.1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/llvm-libunwind/Manifest                   |   1 +
 .../llvm-libunwind/llvm-libunwind-14.0.1.ebuild    | 116 +++++++++++++++++++++
 2 files changed, 117 insertions(+)

diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 701bf6d9b61a..bac9b055090e 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -4,3 +4,4 @@ DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f6
 DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
 DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
 DIST llvmorg-14.0.0.tar.gz 158057350 BLAKE2B 7052684c620a5eaf52beeee4591adf58cfec9e64a5ee0b24f3d5849fd4df5b006e2906a839cb806ac69c33fab6013c58589b1d74e4fb8558758edcb7d5065064 SHA512 eb5acf96b5e2c59bd07579f7ebe73018b0dd6e2f2d9a5a3c7986320e88febd837d1084b9e5313a2264310342193044629d228337cc76dd2b8527dc0a8bdda999
+DIST llvmorg-14.0.1.tar.gz 41058304 BLAKE2B f5865314476e47885f60adb2a87b223f36181a3e92a878c9e2596e15c3e0344e9cecc492879342492abcb84306ecec43f89deee0eb989a90de33e1c6b58f4eb6 SHA512 39e9510e34e5ccd07808f3d981e337b62a1955bb7ac0067214774e9e6274076c8f3a88134648b6964c9aeec0e2390b4db1271c1c437bb5f93fbddc80c146a0fb

diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-14.0.1.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.1.ebuild
new file mode 100644
index 000000000000..377022eb4033
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-14.0.1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://github.com/llvm-mirror/libunwind"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="!sys-libs/libunwind"
+# llvm-6 for new lit options
+DEPEND="
+	>=sys-devel/llvm-6"
+BDEPEND="
+	${PYTHON_DEPS}
+	test? (
+		>=sys-devel/clang-3.9.0
+		$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+	)"
+
+LLVM_COMPONENTS=( runtimes libunwind libcxx llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( libcxxabi llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+multilib_src_configure() {
+	local use_compiler_rt=OFF
+	local libdir=$(get_libdir)
+
+	# link to compiler-rt
+	# https://github.com/gentoo/gentoo/pull/21516
+	if tc-is-clang; then
+		local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+		   ${LD_FLAGS} -print-libgcc-file-name)
+		if [[ ${compiler_rt} == *libclang_rt* ]]; then
+			use_compiler_rt=ON
+		fi
+	fi
+
+	local mycmakeargs=(
+		-DPython3_EXECUTABLE="${PYTHON}"
+		-DLLVM_ENABLE_RUNTIMES="libunwind"
+		-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+		-DLLVM_INCLUDE_TESTS=OFF
+		-DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+		-DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+		-DLIBUNWIND_INCLUDE_TESTS=$(usex test)
+		-DLIBUNWIND_INSTALL_HEADERS=ON
+		-DLIBUNWIND_TARGET_TRIPLE="${CHOST}"
+
+		# support non-native unwinding; given it's small enough,
+		# enable it unconditionally
+		-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
+
+		# avoid dependency on libgcc_s if compiler-rt is used
+		-DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
+	)
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+			-DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx"
+
+			-DLIBCXXABI_LIBDIR_SUFFIX=
+			-DLIBCXXABI_ENABLE_SHARED=OFF
+			-DLIBCXXABI_ENABLE_STATIC=ON
+			-DLIBCXXABI_USE_LLVM_UNWINDER=ON
+			-DLIBCXXABI_INCLUDE_TESTS=OFF
+
+			-DLIBCXX_LIBDIR_SUFFIX=
+			-DLIBCXX_ENABLE_SHARED=OFF
+			-DLIBCXX_ENABLE_STATIC=ON
+			-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+			-DLIBCXX_CXX_ABI=libcxxabi
+			-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+			-DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+			-DLIBCXX_HAS_GCC_S_LIB=OFF
+			-DLIBCXX_INCLUDE_TESTS=OFF
+			-DLIBCXX_INCLUDE_BENCHMARKS=OFF
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+		[[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+
+		# meh, we need to override the compiler explicitly
+		sed -e "/%{cxx}/s@, '.*'@, '${clang_path}'@" \
+			-i "${BUILD_DIR}"/libunwind/test/lit.site.cfg || die
+	fi
+}
+
+multilib_src_test() {
+	local -x LIT_PRESERVES_TMP=1
+	cmake_build check-unwind
+}
+
+multilib_src_install() {
+	DESTDIR=${D} cmake_build install-unwind
+}