mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 22:47:14 -08:00
llvm-runtimes/libcxxabi: Bump to 23.1.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -13,3 +13,5 @@ DIST llvm-project-22.1.8.src.tar.xz 167061596 BLAKE2B 092204f62e0f0364a041c737eb
|
||||
DIST llvm-project-22.1.8.src.tar.xz.sig 119 BLAKE2B 2ce93472036e68782252991e4a8bdbeeec8706a56022220083a38a42ef18714a7894c41aaa04dc0d03f18601d8bfc1a5a030ed0ef0f0d64a662eae9843a4b362 SHA512 99a457b5b1fb409a5fe72b59ebd4ddae5cade3e5f2493e33b44d4f4b4625f7a1743f80106efb1134668842b15ea3400ce2c29263bec8ff986e05040910125e15
|
||||
DIST llvm-project-23.1.0.src.tar.xz 179140728 BLAKE2B 9253189469c70b1e7e326851635934fab85bf64139f1dcd44721ab261c097c9980276d48eac705b999cde0a024a362191c719646956504364534585dbf57d643 SHA512 f87a6084a4b4ddbf155949bb0a9d95592e665683d03db59c65002520634db57bb0b9e90011cbdf1dfc72bf2c649cebc5c546a1de4811c3bfc0b89620b1669061
|
||||
DIST llvm-project-23.1.0.src.tar.xz.sig 119 BLAKE2B 6bd4f681aa0926b3a8e896993fcb238749a5b29dd26f6637e5543699334c0818223d9c798da35515f27fd197cc7de370cc70de3e1bb6721e6c7cac3050879fc7 SHA512 3b1ffaf6fbc6ed08c1d0523b565fb63cbde1a76344bb3ed1a53722482927c03e2652859ef44de962ce90bdb7c5711db63f8d98559bc86cb58294a1cfc62e4b4f
|
||||
DIST llvm-project-23.1.1.src.tar.xz 179168672 BLAKE2B 31d0ad202f4ad38d001baaf638a756508b164229b02a6e41b9689508a33b3a7baecaa10398e20f3661cacb712663fe379eeb94e50e017e40ae546a7e7de8049d SHA512 e51c45f01e95272771bfee8382b213a2e21d3c62e273ff58967cfe40b87f45d2b37a4797b8b83fab025ed7a0ad32adef48406ade2d049da3d7f1799b30edea39
|
||||
DIST llvm-project-23.1.1.src.tar.xz.sig 466 BLAKE2B fd062ee7b6a59295f1ba558ed35fcf03d9d1a2f716cc710ae1b375c9f673eaaf21a7a503652fefbcc91233c9df279c4521f487539264badd0bf591362657024b SHA512 d2e1101f6f3569cc82630e94d9021aaa47e32636d5b0b7fe90c01a56523e3d772835ad7c2a6f2c1a199ed1624a6f12429b43865d6f41405b73b275483effe581
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
inherit cmake-multilib crossdev flag-o-matic llvm.org llvm-utils
|
||||
inherit python-any-r1 toolchain-funcs
|
||||
|
||||
DESCRIPTION="Low level support for a standard C++ library"
|
||||
HOMEPAGE="https://libcxxabi.llvm.org/"
|
||||
|
||||
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
IUSE="+clang +static-libs test"
|
||||
REQUIRED_USE="test? ( clang )"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
llvm-core/llvm:${LLVM_MAJOR}
|
||||
"
|
||||
BDEPEND="
|
||||
clang? (
|
||||
llvm-core/clang:${LLVM_MAJOR}
|
||||
llvm-core/clang-linker-config:${LLVM_MAJOR}
|
||||
llvm-runtimes/clang-rtlib-config:${LLVM_MAJOR}
|
||||
llvm-runtimes/clang-unwindlib-config:${LLVM_MAJOR}
|
||||
)
|
||||
!test? (
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
test? (
|
||||
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
|
||||
)
|
||||
"
|
||||
|
||||
LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/{cmake,utils} cmake )
|
||||
LLVM_TEST_COMPONENTS=( libc llvm/include/llvm/{Demangle,Testing} )
|
||||
llvm.org_set_globals
|
||||
|
||||
python_check_deps() {
|
||||
use test || return 0
|
||||
python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
test_compiler() {
|
||||
target_is_not_host && return
|
||||
$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
|
||||
<<<'int main() { return 0; }' &>/dev/null
|
||||
}
|
||||
|
||||
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-${LLVM_MAJOR}
|
||||
local -x CXX=${CTARGET}-clang++-${LLVM_MAJOR}
|
||||
strip-unsupported-flags
|
||||
|
||||
# The full clang configuration might not be ready yet. Use the partial
|
||||
# configuration of components that libunwind depends on.
|
||||
local flags=(
|
||||
--config="${ESYSROOT}"/etc/clang/"${LLVM_MAJOR}"/gentoo-{rtlib,unwindlib,linker}.cfg
|
||||
)
|
||||
local -x CFLAGS="${CFLAGS} ${flags[@]}"
|
||||
local -x CXXFLAGS="${CXXFLAGS} ${flags[@]}"
|
||||
local -x LDFLAGS="${LDFLAGS} ${flags[@]}"
|
||||
fi
|
||||
|
||||
local nostdlib_flags=( -nostdlib++ )
|
||||
if ! test_compiler && test_compiler "${nostdlib_flags[@]}"; then
|
||||
local -x LDFLAGS="${LDFLAGS} ${nostdlib_flags[*]}"
|
||||
ewarn "${CXX} seems to lack stdlib, trying with ${nostdlib_flags[*]}"
|
||||
fi
|
||||
|
||||
# link to compiler-rt
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
local libdir=$(get_libdir)
|
||||
local mycmakeargs=(
|
||||
-DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
|
||||
|
||||
-DCMAKE_CXX_COMPILER_TARGET="${CTARGET}"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
|
||||
-DLIBCXXABI_ENABLE_SHARED=ON
|
||||
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
|
||||
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
|
||||
-DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
|
||||
|
||||
# upstream is omitting standard search path for this
|
||||
# probably because gcc & clang are bundling their own unwind.h
|
||||
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
|
||||
# this is broken with standalone builds, and also meaningless
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF
|
||||
|
||||
-DLIBCXX_ENABLE_SHARED=ON
|
||||
-DLIBCXX_ENABLE_STATIC=OFF
|
||||
-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_BENCHMARKS=OFF
|
||||
-DLIBCXX_INCLUDE_TESTS=OFF
|
||||
)
|
||||
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
|
||||
# Install inside the cross sysroot.
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/${CTARGET}/usr"
|
||||
)
|
||||
fi
|
||||
if use test; then
|
||||
mycmakeargs+=(
|
||||
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
|
||||
-DLLVM_LIT_ARGS="$(get_lit_flags)"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
)
|
||||
fi
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
cmake_build cxxabi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
local -x LIT_PRESERVES_TMP=1
|
||||
cmake_build check-cxxabi
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
DESTDIR="${D}" cmake_build install-cxxabi
|
||||
}
|
||||
Reference in New Issue
Block a user