Per https://reviews.llvm.org/rL359576, compiler-rt is able to provide crtbegin.o and crtend.o for the x86, amd64, arm32, and arm64 architectures. The any-of block for the crt USE flag **should** also include sys-libs/compiler-rt. Note that I haven't actually tested this in any of the architectures that supports the creation of crtbegin.o/crtend.o. I bumped into this while trying to port crt support to RISC-V.
2 ideas: 1. In sys-devel/clang-runtime: RDEPEND="... crt? ( || ( amd64? ( ~sys-libs/compiler-rt-${PV}:${SLOT}[${MULTILIB_USEDEP}] ) arm? ( ~sys-libs/compiler-rt-${PV}:${SLOT}[${MULTILIB_USEDEP}] ) arm64? ( ~sys-libs/compiler-rt-${PV}:${SLOT}[${MULTILIB_USEDEP}] ) x86? ( ~sys-libs/compiler-rt-${PV}:${SLOT}[${MULTILIB_USEDEP}] ) sys-libs/netbsd-csu[${MULTILIB_USEDEP}] sys-freebsd/freebsd-lib[${MULTILIB_USEDEP}] ) ) ..." 2. IUSE="+crt" in sys-libs/compiler-rt and package.use.masking this USE flag in architectures other than amd64, arm, arm64 and x86. Then in sys-devel/clang-runtime: RDEPEND="... crt? ( || ( ~sys-libs/compiler-rt-${PV}:${SLOT}[${MULTILIB_USEDEP},crt] sys-libs/netbsd-csu[${MULTILIB_USEDEP}] sys-freebsd/freebsd-lib[${MULTILIB_USEDEP}] ) ) ..."
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10d369d452818efb3b9a3df5412ee39f3f44ee56 commit 10d369d452818efb3b9a3df5412ee39f3f44ee56 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-10-11 13:46:39 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-10-11 14:13:35 +0000 sys-devel/clang-runtime: Remove USE=crt from 9+ Since LLVM 9.0.0, compiler-rt provides crt* objects. The separate 'crt' flag was provided only to let people choose whether they want to install netbsd-csu on Linux. Remove it and use USE=compiler-rt for both main libs and crt. Closes: https://bugs.gentoo.org/697468 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-devel/clang-runtime/clang-runtime-10.0.0.9999.ebuild | 8 +------- sys-devel/clang-runtime/clang-runtime-9.0.0.9999.ebuild | 8 +------- sys-devel/clang-runtime/clang-runtime-9.0.0.ebuild | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-)