commit: 7d59ffc9da32163e119c46874886418707a8d96c Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Mar 17 17:57:37 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Mar 17 20:13:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d59ffc9
llvm-runtimes/flang-rt: Add 21.0.0_pre20250317 snapshot Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> llvm-runtimes/flang-rt/Manifest | 1 + .../flang-rt/flang-rt-21.0.0_pre20250317.ebuild | 72 ++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/llvm-runtimes/flang-rt/Manifest b/llvm-runtimes/flang-rt/Manifest index c0f3bf3f38ba..e6d56a6b3e5a 100644 --- a/llvm-runtimes/flang-rt/Manifest +++ b/llvm-runtimes/flang-rt/Manifest @@ -1 +1,2 @@ +DIST llvm-project-1c3a9a853ce68c3c539e7cab21380b9d8b18f426.tar.gz 229448743 BLAKE2B c1eacc2ed05c460f56cf83f16b982e3fa4ac530483d7cf003034239aff3b3dbffbdd3042a3f295a83ec94fcf32f802714e4937fd3761a5e03d4ed1b4093e81bf SHA512 98b7e9fa330a6fce33ca9757caf5d2e41d0b73117cb24b2aed880274c2d6f8a8c1a0028dd0e773fa42deb61dbe3b9dd4fb2f44e50814b966fcdeae8e5b417e6d DIST llvm-project-cb7298f66d62a3548fcf3bd230304067ecf30d17.tar.gz 229200711 BLAKE2B 1910569812e7423cf566b0dec67269404ba8db8232ab293bc603a88914f2b756e3088bf2133c0fca612cc58d39691c7b813b3c5839a7ac9a3d177fe6bde766c6 SHA512 07c3f6ce34e7d32c5ebce1d2efb77e6a1dde49f9eedf7191733a20bdcb6ffd0c03f8fc8de85fd00bd9465b209f140639a68a367d2218c028bfa6e06067cc3e14 diff --git a/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250317.ebuild b/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250317.ebuild new file mode 100644 index 000000000000..30245857a84e --- /dev/null +++ b/llvm-runtimes/flang-rt/flang-rt-21.0.0_pre20250317.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake flag-o-matic llvm.org + +DESCRIPTION="LLVM's Fortran runtime" +HOMEPAGE="https://flang.llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions" +SLOT="${LLVM_MAJOR}" +IUSE="+debug test" +RESTRICT="!test? ( test )" + +RDEPEND=" + !<llvm-core/flang-21.0.0_pre20250221-r1 +" +BDEPEND=" + llvm-core/llvm:${LLVM_MAJOR} + llvm-core/flang + test? ( + dev-python/lit + ) +" + +LLVM_COMPONENTS=( + runtimes flang-rt cmake flang llvm/{cmake,utils/llvm-lit} +) +llvm.org_set_globals + +src_configure() { + # the code is not portable + local -x FC=flang F77=flang + strip-unsupported-flags + + local mycmakeargs=( + # we may not have a runtime yet + -DCMAKE_Fortran_COMPILER_WORKS=TRUE + + -DLLVM_ENABLE_RUNTIMES="flang-rt" + # this package forces NO_DEFAULT_PATHS + -DLLVM_BINARY_DIR="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}" + + -DFLANG_RT_INCLUDE_TESTS=$(usex test) + ) + use test && mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="$(get_lit_flags)" + ) + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake_src_configure +} + +src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake_build check-flang-rt +} + +src_install() { + cmake_src_install + + # in standalone build, the library is installed to (incorrect) resource dir + # but the driver only looks for it in lib (sigh) + # https://github.com/llvm/llvm-project/issues/127538 + mkdir -p "${ED}/usr/lib/llvm/${LLVM_MAJOR}" || die + mv "${ED}/usr/$(get_libdir)/clang/${LLVM_MAJOR}/lib"/* \ + "${ED}/usr/lib/llvm/${LLVM_MAJOR}/lib" || die +}
