commit: 00c00d63e6a6e057190a426dea51ea2fd62f5f80
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 22 19:05:54 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Oct 22 19:12:17 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00c00d63
llvm-runtimes/flang-rt: Add 22.0.0_pre20251022 snapshot
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
llvm-runtimes/flang-rt/Manifest | 1 +
.../flang-rt/flang-rt-22.0.0_pre20251022.ebuild | 73 ++++++++++++++++++++++
2 files changed, 74 insertions(+)
diff --git a/llvm-runtimes/flang-rt/Manifest b/llvm-runtimes/flang-rt/Manifest
index 2c0e40e30f53..2b152a7f299f 100644
--- a/llvm-runtimes/flang-rt/Manifest
+++ b/llvm-runtimes/flang-rt/Manifest
@@ -1,3 +1,4 @@
DIST llvm-project-21.1.4.src.tar.xz 158939036 BLAKE2B
b87eff4e3cb881d86aafcfdb46d85344ad6ae92d5c1e72c05282f375b4b11844756d0e6b4d0da5e522a348170a5da9842917737e272b758d8dde7e1fb2bee135
SHA512
a8c0883abe7c5a3e55ca7ed0fd974fae4351184a0b0df18295a982ca8ddb0f8d167353564204ed00f0cd9a1d8baef7074c0b39a99e0b5c52ced6bbee73dde3da
DIST llvm-project-21.1.4.src.tar.xz.sig 119 BLAKE2B
c74a56448ad3e325234fcbe7d62ea888831e1e7696afb5aa5a185ea76a0880abe2d755f9e69a07760bbf9380534c3bb96c920ed6359ffd0f5f51c962d1494dcf
SHA512
4812c2e3861aa3b726d842c3ca259b19ef1aa531fed9f6f47099483de91de2b2a165f40d243f6f40f2eea749741d5f8b7090f394399c56db02053f308921077a
+DIST llvm-project-57a8599d14d4685487064e8b8a5c748970daa4d6.tar.gz 250938364
BLAKE2B
793d84c9716cb392667f84005048d549c96cbdbe666b52025c4f3fbd59d47d0b8b1d2485fe5ea52dfb67b6617e97b17197b208dc0d6744468475e459d0193b6d
SHA512
06a2dfd70fc7a0bc772a67cc2eb5fe25cf5a170a3e0e07dfa284aaf5f4d90337a66ff026843c7798ed6bbdca84aa42428a9a9caf7ceba354665d2cd811ae84e6
DIST llvm-project-6a0e5b2fd7c340a872ae1e011cfb9de0d188feba.tar.gz 249848364
BLAKE2B
5d8eadfd43e1a131d7c061968c7d306b0537c0983c9366973d5b8d1bab4b384d1319604e12f097e235e077aefcd8b9c8395c3e16b53612f9f06fb11ba358aad6
SHA512
d931218ca1dafab09525f862f4b993cb6dde2f8738092e84b87542318d05c81fd41499098833f8629501c19f4fa741a35fc6447631f1c8830b2bb0b2cb64cc43
diff --git a/llvm-runtimes/flang-rt/flang-rt-22.0.0_pre20251022.ebuild
b/llvm-runtimes/flang-rt/flang-rt-22.0.0_pre20251022.ebuild
new file mode 100644
index 000000000000..afd5496ffa4b
--- /dev/null
+++ b/llvm-runtimes/flang-rt/flang-rt-22.0.0_pre20251022.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake flag-o-matic llvm.org python-any-r1
+
+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? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=(
+ runtimes flang-rt cmake flang llvm/{cmake,utils/llvm-lit}
+)
+llvm.org_set_globals
+
+python_check_deps() {
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+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}"
+ # set correct install paths
+
-DFLANG_RT_INSTALL_RESOURCE_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+ -DLLVM_DEFAULT_TARGET_TRIPLE="${CHOST}"
+
+ -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
+}