commit: 84c8030e81a7e6e710b82d0ae9b28a190e6e2ee0 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Sep 19 09:17:28 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Sep 20 11:05:58 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84c8030e
sys-devel/lld-toolchain-symlinks: New package for binutils-free sys New package that installs generic "ld" symlink to LLD, for use on binutils-free systems. Note that while LLD itself is not slotted, this package is as it installs symlinks into slotted LLVM directories to avoid colliding with binutils-config. Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../lld-toolchain-symlinks-16.ebuild | 34 ++++++++++++++++++++++ sys-devel/lld-toolchain-symlinks/metadata.xml | 16 ++++++++++ 2 files changed, 50 insertions(+) diff --git a/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16.ebuild b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16.ebuild new file mode 100644 index 000000000000..aefb59aafa0d --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/lld-toolchain-symlinks-16.ebuild @@ -0,0 +1,34 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib + +DESCRIPTION="Symlinks to use LLD on binutils-free system" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM" +SRC_URI="" +S=${WORKDIR} + +LICENSE="public-domain" +SLOT="${PV}" +KEYWORDS="" +PROPERTIES="live" +IUSE="+native-symlinks" + +RDEPEND=" + sys-devel/lld +" + +src_install() { + use native-symlinks || return + + local abi + local dest=/usr/lib/llvm/${SLOT}/bin + dodir "${dest}" + dosym ../../../../bin/ld.lld "${dest}/ld" + for abi in $(get_all_abis); do + local abi_chost=$(get_abi_CHOST "${abi}") + dosym ../../../../bin/ld.lld "${dest}/${abi_chost}-ld" + done +} diff --git a/sys-devel/lld-toolchain-symlinks/metadata.xml b/sys-devel/lld-toolchain-symlinks/metadata.xml new file mode 100644 index 000000000000..1583779e583b --- /dev/null +++ b/sys-devel/lld-toolchain-symlinks/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + </maintainer> + <use> + <flag name="native-symlinks"> + Install generic 'ld' symlink, as well as ${CTARGET}-ld. + These symlinks are installed into slotted LLVM bindir, + so they should not take precedence over symlinks installed + into /usr/bin by <pkg>sys-devel/binutils-config</pkg> + but they can be helpful for binutils-free setups. + </flag> + </use> +</pkgmetadata>
