public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/clang-unwindlib-config/, metadata/stabilization-groups/
@ 2025-09-02 14:29 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2025-09-02 14:29 UTC (permalink / raw
  To: gentoo-commits

commit:     687e64f1549066f23bd8d744d554b626423aa7fe
Author:     Michal Rostecki <vadorovsky <AT> protonmail <DOT> com>
AuthorDate: Tue Aug 26 15:49:48 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep  2 13:17:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=687e64f1

llvm-runtimes/clang-unwindlib-config: New package

Provide a new package which creates a partial clang config file
`/etc/clang/${LLVM_VERSION}/gentoo-unwindlib.cfg`, unsed to control the
default unwindlib used by clang.

Signed-off-by: Michal Rostecki <vadorovsky <AT> protonmail.com>
Closes: https://bugs.gentoo.org/951445
Part-of: https://github.com/gentoo/gentoo/pull/42663
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/42663
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../clang-unwindlib-config-20.ebuild               | 31 ++++++++++++++++++++++
 .../clang-unwindlib-config-21.ebuild               | 31 ++++++++++++++++++++++
 .../clang-unwindlib-config-22.ebuild               | 30 +++++++++++++++++++++
 llvm-runtimes/clang-unwindlib-config/metadata.xml  | 18 +++++++++++++
 metadata/stabilization-groups/llvm.group           |  1 +
 5 files changed, 111 insertions(+)

diff --git a/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-20.ebuild b/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-20.ebuild
new file mode 100644
index 000000000000..a48029c5aa37
--- /dev/null
+++ b/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-20.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Default unwindlib configuration for clang"
+HOMEPAGE="https://clang.llvm.org/"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="default-compiler-rt llvm-libunwind"
+
+RDEPEND="
+	default-compiler-rt? (
+		llvm-libunwind? ( >=llvm-runtimes/libunwind-${PV}[static-libs] )
+		!llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+	)
+	!default-compiler-rt? ( sys-devel/gcc )
+"
+
+src_install() {
+	insinto "/etc/clang/${SLOT}"
+	newins - gentoo-unwindlib.cfg <<-EOF
+		# This file is initially generated by ${CATEGORY}/${PN}.
+		# It is used to control the default unwindlib used by clang.
+
+		--unwindlib=$(usex default-compiler-rt libunwind libgcc)
+	EOF
+}

diff --git a/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-21.ebuild b/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-21.ebuild
new file mode 100644
index 000000000000..a48029c5aa37
--- /dev/null
+++ b/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-21.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Default unwindlib configuration for clang"
+HOMEPAGE="https://clang.llvm.org/"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="default-compiler-rt llvm-libunwind"
+
+RDEPEND="
+	default-compiler-rt? (
+		llvm-libunwind? ( >=llvm-runtimes/libunwind-${PV}[static-libs] )
+		!llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+	)
+	!default-compiler-rt? ( sys-devel/gcc )
+"
+
+src_install() {
+	insinto "/etc/clang/${SLOT}"
+	newins - gentoo-unwindlib.cfg <<-EOF
+		# This file is initially generated by ${CATEGORY}/${PN}.
+		# It is used to control the default unwindlib used by clang.
+
+		--unwindlib=$(usex default-compiler-rt libunwind libgcc)
+	EOF
+}

diff --git a/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-22.ebuild b/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-22.ebuild
new file mode 100644
index 000000000000..fba75218c731
--- /dev/null
+++ b/llvm-runtimes/clang-unwindlib-config/clang-unwindlib-config-22.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Default unwindlib configuration for clang"
+HOMEPAGE="https://clang.llvm.org/"
+S=${WORKDIR}
+
+LICENSE="public-domain"
+SLOT="${PV}"
+IUSE="default-compiler-rt llvm-libunwind"
+
+RDEPEND="
+	default-compiler-rt? (
+		llvm-libunwind? ( >=llvm-runtimes/libunwind-${PV}[static-libs] )
+		!llvm-libunwind? ( sys-libs/libunwind[static-libs] )
+	)
+	!default-compiler-rt? ( sys-devel/gcc )
+"
+
+src_install() {
+	insinto "/etc/clang/${SLOT}"
+	newins - gentoo-unwindlib.cfg <<-EOF
+		# This file is initially generated by ${CATEGORY}/${PN}.
+		# It is used to control the default unwindlib used by clang.
+
+		--unwindlib=$(usex default-compiler-rt libunwind libgcc)
+	EOF
+}

diff --git a/llvm-runtimes/clang-unwindlib-config/metadata.xml b/llvm-runtimes/clang-unwindlib-config/metadata.xml
new file mode 100644
index 000000000000..3764a0cbe9e1
--- /dev/null
+++ b/llvm-runtimes/clang-unwindlib-config/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>vadorovsky@protonmail.com</email>
+		<name>Michal Rostecki</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>llvm@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag>
+		<flag name="llvm-libunwind">Use LLVM libunwind instead of GNU libunwind</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">llvm/llvm-project</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/metadata/stabilization-groups/llvm.group b/metadata/stabilization-groups/llvm.group
index 7ceb970d5ba7..0346dcc1e558 100644
--- a/metadata/stabilization-groups/llvm.group
+++ b/metadata/stabilization-groups/llvm.group
@@ -26,6 +26,7 @@ llvm-runtimes/openmp
 llvm-runtimes/offload
 llvm-core/clang-linker-config
 llvm-runtimes/clang-rtlib-config
+llvm-runtimes/clang-unwindlib-config
 llvm-core/clang-runtime
 llvm-core/libclc
 llvm-runtimes/libatomic-stub


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-02 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 14:29 [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/clang-unwindlib-config/, metadata/stabilization-groups/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox