• [gentoo-dev] [PATCH 4/4] sys-libs/compiler-rt: Support LLVM/Clang cross

    From Alfred Persson Forsberg@21:1/5 to All on Fri Aug 11 06:00:01 2023
    Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
    ---
    .../compiler-rt-17.0.0.9999.ebuild | 36 ++++++++++++++++---
    1 file changed, 32 insertions(+), 4 deletions(-)

    diff --git a/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
    index f31c17f1962a..6075965a0991 100644
    --- a/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
    +++ b/sys-libs/compiler-rt/compiler-rt-17.0.0.9999.ebuild
    @@ -4,7 +4,7 @@
    EAPI=8

    PYTHON_COMPAT=( python3_{10..12} )
    -inherit cmake flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs +inherit cmake cross flag-o-matic llvm llvm.org python-any-r1 toolchain-funcs

    DESCRIPTION="Compiler runtime library for clang (built-in part)"
    HOMEPAGE="https://llvm.org/"
    @@ -52,10 +52,18 @@ pkg_setup() {
    if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
    LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
    fi
    +
    + if is_crosscompile || tc-is-cross-compiler ; then
    + # strips vars like CFLAGS="-march=x86_64-v3" for non-x86 architectures
    + CHOST