From 64ceefebcdefb34eb53b5441c67ac762755df437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 19 Jul 2025 08:42:18 +0200 Subject: [PATCH] llvm-core/llvm-toolchain-symlinks: Add 22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../llvm-toolchain-symlinks-22.ebuild | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 llvm-core/llvm-toolchain-symlinks/llvm-toolchain-symlinks-22.ebuild diff --git a/llvm-core/llvm-toolchain-symlinks/llvm-toolchain-symlinks-22.ebuild b/llvm-core/llvm-toolchain-symlinks/llvm-toolchain-symlinks-22.ebuild new file mode 100644 index 0000000000000..d0685cb7ad8d2 --- /dev/null +++ b/llvm-core/llvm-toolchain-symlinks/llvm-toolchain-symlinks-22.ebuild @@ -0,0 +1,48 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLVM on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +IUSE="multilib-symlinks +native-symlinks" + +RDEPEND=" + llvm-core/llvm:${SLOT} +" + +src_install() { + use native-symlinks || return + + local tools=( + addr2line ar dlltool nm objcopy objdump ranlib readelf size + strings strip windres + # https://bugs.gentoo.org/936068 + cxxfilt:c++filt + ) + local chosts=( "${CHOST}" ) + if use multilib-symlinks; then + local abi + for abi in $(get_all_abis); do + chosts+=( "$(get_abi_CHOST "${abi}")" ) + done + fi + + local chost t + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + for t in "${tools[@]}"; do + dosym "llvm-${t%:*}" "${dest}/${t#*:}" + done + for chost in "${chosts[@]}"; do + for t in "${tools[@]}"; do + dosym "llvm-${t%:*}" "${dest}/${chost}-${t#*:}" + done + done +}