commit:     dd86aa7a1bf0e11739bf1d09c11531d194529a62
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 17 16:27:19 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Mar 17 16:29:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd86aa7a

llvm-runtimes/libunwind: Revert "Support cross build"

Reverts: bde0805b5bcca1a2058ab57b2c3a3723d9024384
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/libunwind/libunwind-19.1.7-r1.ebuild | 142 ---------------------
 llvm-runtimes/libunwind/libunwind-20.1.0.ebuild    |  23 +---
 .../libunwind/libunwind-21.0.0.9999.ebuild         |  23 +---
 3 files changed, 10 insertions(+), 178 deletions(-)

diff --git a/llvm-runtimes/libunwind/libunwind-19.1.7-r1.ebuild 
b/llvm-runtimes/libunwind/libunwind-19.1.7-r1.ebuild
deleted file mode 100644
index e78633a452af..000000000000
--- a/llvm-runtimes/libunwind/libunwind-19.1.7-r1.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit cmake-multilib crossdev flag-o-matic llvm.org llvm-utils
-inherit python-any-r1 toolchain-funcs
-
-DESCRIPTION="C++ runtime stack unwinder from LLVM"
-HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 
~arm64-macos ~x64-macos"
-IUSE="+clang debug static-libs test"
-REQUIRED_USE="test? ( clang )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-       !sys-libs/libunwind
-"
-DEPEND="
-       llvm-core/llvm:${LLVM_MAJOR}
-"
-BDEPEND="
-       clang? (
-               llvm-core/clang:${LLVM_MAJOR}
-       )
-       !test? (
-               ${PYTHON_DEPS}
-       )
-       test? (
-               $(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
-       python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-multilib_src_configure() {
-       llvm_prepend_path "${LLVM_MAJOR}"
-
-       local libdir=$(get_libdir)
-
-       # https://github.com/llvm/llvm-project/issues/56825
-       # also separately bug #863917
-       filter-lto
-
-       if use clang; then
-               local -x CC=${CTARGET}-clang
-               local -x CXX=${CTARGET}-clang++
-               strip-unsupported-flags
-       fi
-
-       # link to compiler-rt
-       # https://github.com/gentoo/gentoo/pull/21516
-       local use_compiler_rt=OFF
-       [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
-
-       # Respect upstream build type assumptions (bug #910436) where they do:
-       # -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
-       #       -DCMAKE_BUILD_TYPE=DEBUG  => -UNDEBUG
-       #       -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
-       # -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
-       #       -UNDEBUG
-       # See also 
https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
-       use debug || append-cppflags -DNDEBUG
-
-       local install_prefix="${EPREFIX}"
-       target_is_not_host && install_prefix+=/usr/${CTARGET}
-
-       local mycmakeargs=(
-               -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
-               -DCMAKE_CXX_COMPILER_TARGET="${CTARGET}"
-               -DCMAKE_INSTALL_PREFIX="${install_prefix}/usr"
-               -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
-
-               # 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 is_crosspkg; then
-               mycmakeargs+=(
-                       # Without this, the compiler will compile a test program
-                       # and fail due to no builtins.
-                       -DCMAKE_C_COMPILER_WORKS=1
-                       -DCMAKE_CXX_COMPILER_WORKS=1
-               )
-       fi
-       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_CXX_ABI=libcxxabi
-                       -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
-                       -DLIBCXX_HAS_MUSL_LIBC=$(llvm_cmake_use_musl)
-                       -DLIBCXX_HAS_GCC_S_LIB=OFF
-                       -DLIBCXX_INCLUDE_TESTS=OFF
-                       -DLIBCXX_INCLUDE_BENCHMARKS=OFF
-               )
-       fi
-
-       cmake_src_configure
-}
-
-multilib_src_test() {
-       local -x LIT_PRESERVES_TMP=1
-       cmake_build check-unwind
-}
-
-multilib_src_install() {
-       DESTDIR=${D} cmake_build install-unwind
-}

diff --git a/llvm-runtimes/libunwind/libunwind-20.1.0.ebuild 
b/llvm-runtimes/libunwind/libunwind-20.1.0.ebuild
index d746ace56914..1fce26a90bfc 100644
--- a/llvm-runtimes/libunwind/libunwind-20.1.0.ebuild
+++ b/llvm-runtimes/libunwind/libunwind-20.1.0.ebuild
@@ -4,8 +4,8 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{10..13} )
-inherit cmake-multilib crossdev flag-o-matic llvm.org llvm-utils
-inherit python-any-r1 toolchain-funcs
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
 
 DESCRIPTION="C++ runtime stack unwinder from LLVM"
 HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html";
@@ -54,8 +54,8 @@ multilib_src_configure() {
        filter-lto
 
        if use clang; then
-               local -x CC=${CTARGET}-clang
-               local -x CXX=${CTARGET}-clang++
+               local -x CC=${CHOST}-clang
+               local -x CXX=${CHOST}-clang++
                strip-unsupported-flags
        fi
 
@@ -73,13 +73,8 @@ multilib_src_configure() {
        # See also 
https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
        use debug || append-cppflags -DNDEBUG
 
-       local install_prefix="${EPREFIX}"
-       target_is_not_host && install_prefix+=/usr/${CTARGET}
-
        local mycmakeargs=(
-               -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
-               -DCMAKE_CXX_COMPILER_TARGET="${CTARGET}"
-               -DCMAKE_INSTALL_PREFIX="${install_prefix}/usr"
+               -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
                -DPython3_EXECUTABLE="${PYTHON}"
                -DLLVM_ENABLE_RUNTIMES="libunwind"
                -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
@@ -96,14 +91,6 @@ multilib_src_configure() {
                # avoid dependency on libgcc_s if compiler-rt is used
                -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
        )
-       if is_crosspkg; then
-               mycmakeargs+=(
-                       # Without this, the compiler will compile a test program
-                       # and fail due to no builtins.
-                       -DCMAKE_C_COMPILER_WORKS=1
-                       -DCMAKE_CXX_COMPILER_WORKS=1
-               )
-       fi
        if use test; then
                mycmakeargs+=(
                        -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"

diff --git a/llvm-runtimes/libunwind/libunwind-21.0.0.9999.ebuild 
b/llvm-runtimes/libunwind/libunwind-21.0.0.9999.ebuild
index d4a064a47232..026430534993 100644
--- a/llvm-runtimes/libunwind/libunwind-21.0.0.9999.ebuild
+++ b/llvm-runtimes/libunwind/libunwind-21.0.0.9999.ebuild
@@ -4,8 +4,8 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{10..13} )
-inherit cmake-multilib crossdev flag-o-matic llvm.org llvm-utils
-inherit python-any-r1 toolchain-funcs
+inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
+inherit toolchain-funcs
 
 DESCRIPTION="C++ runtime stack unwinder from LLVM"
 HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html";
@@ -53,8 +53,8 @@ multilib_src_configure() {
        filter-lto
 
        if use clang; then
-               local -x CC=${CTARGET}-clang
-               local -x CXX=${CTARGET}-clang++
+               local -x CC=${CHOST}-clang
+               local -x CXX=${CHOST}-clang++
                strip-unsupported-flags
        fi
 
@@ -72,13 +72,8 @@ multilib_src_configure() {
        # See also 
https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
        use debug || append-cppflags -DNDEBUG
 
-       local install_prefix="${EPREFIX}"
-       target_is_not_host && install_prefix+=/usr/${CTARGET}
-
        local mycmakeargs=(
-               -DCMAKE_C_COMPILER_TARGET="${CTARGET}"
-               -DCMAKE_CXX_COMPILER_TARGET="${CTARGET}"
-               -DCMAKE_INSTALL_PREFIX="${install_prefix}/usr"
+               -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
                -DPython3_EXECUTABLE="${PYTHON}"
                -DLLVM_ENABLE_RUNTIMES="libunwind"
                -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
@@ -95,14 +90,6 @@ multilib_src_configure() {
                # avoid dependency on libgcc_s if compiler-rt is used
                -DLIBUNWIND_USE_COMPILER_RT=${use_compiler_rt}
        )
-       if is_crosspkg; then
-               mycmakeargs+=(
-                       # Without this, the compiler will compile a test program
-                       # and fail due to no builtins.
-                       -DCMAKE_C_COMPILER_WORKS=1
-                       -DCMAKE_CXX_COMPILER_WORKS=1
-               )
-       fi
        if use test; then
                mycmakeargs+=(
                        -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx"

Reply via email to