commit:     85466dd307b691d09ef1abfeb5079b123353d844
Author:     Michal Rostecki <vadorovsky <AT> protonmail <DOT> com>
AuthorDate: Wed Aug  6 19:16:53 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug  6 20:05:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85466dd3

llvm-runtimes/libcxxabi: Set CTARGET to CHOST if the package is not cross

The multilib eclass doesn't set the CTARGET. Therefore, using CTARGET
was breaking the multilib builds. At the same time, using CTARGET is
necessary for crossdev to work.

The long term solution should be fixing multilib eclass, but for now,
make sure that CTARGET is correct inside the ebuild.

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

 llvm-runtimes/libcxxabi/libcxxabi-19.1.7.ebuild      | 6 ++++++
 llvm-runtimes/libcxxabi/libcxxabi-20.1.8.ebuild      | 6 ++++++
 llvm-runtimes/libcxxabi/libcxxabi-21.1.0.9999.ebuild | 6 ++++++
 llvm-runtimes/libcxxabi/libcxxabi-22.0.0.9999.ebuild | 6 ++++++
 4 files changed, 24 insertions(+)

diff --git a/llvm-runtimes/libcxxabi/libcxxabi-19.1.7.ebuild 
b/llvm-runtimes/libcxxabi/libcxxabi-19.1.7.ebuild
index 6c3f4635d98d..fa88464e9676 100644
--- a/llvm-runtimes/libcxxabi/libcxxabi-19.1.7.ebuild
+++ b/llvm-runtimes/libcxxabi/libcxxabi-19.1.7.ebuild
@@ -47,6 +47,12 @@ python_check_deps() {
 }
 
 multilib_src_configure() {
+       # Workaround for bgo #961153.
+       # TODO: Fix the multilib.eclass, so it sets CTARGET properly.
+       if ! is_crosspkg; then
+               export CTARGET=${CHOST}
+       fi
+
        if use clang; then
                llvm_prepend_path -b "${LLVM_MAJOR}"
                local -x CC=${CTARGET}-clang

diff --git a/llvm-runtimes/libcxxabi/libcxxabi-20.1.8.ebuild 
b/llvm-runtimes/libcxxabi/libcxxabi-20.1.8.ebuild
index 5668a32deb26..d78488d647d9 100644
--- a/llvm-runtimes/libcxxabi/libcxxabi-20.1.8.ebuild
+++ b/llvm-runtimes/libcxxabi/libcxxabi-20.1.8.ebuild
@@ -47,6 +47,12 @@ python_check_deps() {
 }
 
 multilib_src_configure() {
+       # Workaround for bgo #961153.
+       # TODO: Fix the multilib.eclass, so it sets CTARGET properly.
+       if ! is_crosspkg; then
+               export CTARGET=${CHOST}
+       fi
+
        if use clang; then
                llvm_prepend_path -b "${LLVM_MAJOR}"
                local -x CC=${CTARGET}-clang

diff --git a/llvm-runtimes/libcxxabi/libcxxabi-21.1.0.9999.ebuild 
b/llvm-runtimes/libcxxabi/libcxxabi-21.1.0.9999.ebuild
index f929e4caf008..d1a2b5b4668a 100644
--- a/llvm-runtimes/libcxxabi/libcxxabi-21.1.0.9999.ebuild
+++ b/llvm-runtimes/libcxxabi/libcxxabi-21.1.0.9999.ebuild
@@ -48,6 +48,12 @@ python_check_deps() {
 }
 
 multilib_src_configure() {
+       # Workaround for bgo #961153.
+       # TODO: Fix the multilib.eclass, so it sets CTARGET properly.
+       if ! is_crosspkg; then
+               export CTARGET=${CHOST}
+       fi
+
        if use clang; then
                llvm_prepend_path -b "${LLVM_MAJOR}"
                local -x CC=${CTARGET}-clang

diff --git a/llvm-runtimes/libcxxabi/libcxxabi-22.0.0.9999.ebuild 
b/llvm-runtimes/libcxxabi/libcxxabi-22.0.0.9999.ebuild
index f929e4caf008..d1a2b5b4668a 100644
--- a/llvm-runtimes/libcxxabi/libcxxabi-22.0.0.9999.ebuild
+++ b/llvm-runtimes/libcxxabi/libcxxabi-22.0.0.9999.ebuild
@@ -48,6 +48,12 @@ python_check_deps() {
 }
 
 multilib_src_configure() {
+       # Workaround for bgo #961153.
+       # TODO: Fix the multilib.eclass, so it sets CTARGET properly.
+       if ! is_crosspkg; then
+               export CTARGET=${CHOST}
+       fi
+
        if use clang; then
                llvm_prepend_path -b "${LLVM_MAJOR}"
                local -x CC=${CTARGET}-clang

Reply via email to