From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 123FA159C9B for ; Tue, 23 Jul 2024 14:08:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F8F0E29F3; Tue, 23 Jul 2024 14:08:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0806FE29F5 for ; Tue, 23 Jul 2024 14:08:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 21483340C20 for ; Tue, 23 Jul 2024 14:08:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8894D1E69 for ; Tue, 23 Jul 2024 14:07:58 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1721743661.6e129deb06cdb2fb41fbe2217b4858a868cf343a.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/lld/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/lld/lld-20.0.0.9999.ebuild X-VCS-Directories: sys-devel/lld/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 6e129deb06cdb2fb41fbe2217b4858a868cf343a X-VCS-Branch: master Date: Tue, 23 Jul 2024 14:07:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 24b916c6-6a59-4098-92f9-b2691e7b6734 X-Archives-Hash: cf48ee4095d23c71f1d7b091f14f7124 commit: 6e129deb06cdb2fb41fbe2217b4858a868cf343a Author: Michał Górny gentoo org> AuthorDate: Tue Jul 23 14:00:45 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Jul 23 14:07:41 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e129deb sys-devel/lld: Add 20.x live ebuilds Signed-off-by: Michał Górny gentoo.org> sys-devel/lld/lld-20.0.0.9999.ebuild | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/sys-devel/lld/lld-20.0.0.9999.ebuild b/sys-devel/lld/lld-20.0.0.9999.ebuild new file mode 100644 index 000000000000..79558afa1abe --- /dev/null +++ b/sys-devel/lld/lld-20.0.0.9999.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+debug test zstd" +RESTRICT="!test? ( test )" + +DEPEND=" + ~sys-devel/llvm-${PV}[debug=,zstd=] + sys-libs/zlib:= + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} + !sys-devel/lld:0 +" +BDEPEND=" + sys-devel/llvm:${LLVM_MAJOR} + test? ( + $(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]") + ) +" +PDEPEND=" + >=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR} +" + +LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) +llvm.org_set_globals + +python_check_deps() { + python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_unpack() { + llvm.org_src_unpack + + # Directory ${WORKDIR}/llvm does not exist with USE="-test", + # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, + # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system + # (lld/MachO/CMakeLists.txt) and is expected to be resolvable + # to existent directory ${WORKDIR}/libunwind/include. + mkdir -p "${WORKDIR}/llvm" || die +} + +src_configure() { + llvm_prepend_path "${LLVM_MAJOR}" + + # ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353) + filter-lto + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + -DBUILD_SHARED_LIBS=ON + -DLLVM_INCLUDE_TESTS=$(usex test) + -DLLVM_ENABLE_ZLIB=FORCE_ON + -DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF) + ) + + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + -DPython3_EXECUTABLE="${PYTHON}" + ) + + tc-is-cross-compiler && mycmakeargs+=( + -DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen" + ) + + cmake_src_configure +} + +src_test() { + local -x LIT_PRESERVES_TMP=1 + cmake_build check-lld +}