From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 finch.gentoo.org (Postfix) with ESMTPS id A0AA8158091 for ; Sat, 28 Jun 2025 15:03:45 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 4B86D341004 for ; Sat, 28 Jun 2025 15:03:45 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 43EA8110560; Sat, 28 Jun 2025 15:03:33 +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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 361F9110560 for ; Sat, 28 Jun 2025 15:03:33 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DE4DE340DD5 for ; Sat, 28 Jun 2025 15:03:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7F92F2AC3 for ; Sat, 28 Jun 2025 15:03:30 +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: <1751122850.36c30e8b89b94866b4205376b1bbf6702247e33e.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: llvm-core/flang/ X-VCS-Repository: repo/gentoo X-VCS-Files: llvm-core/flang/Manifest llvm-core/flang/flang-21.0.0_pre20250628.ebuild X-VCS-Directories: llvm-core/flang/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 36c30e8b89b94866b4205376b1bbf6702247e33e X-VCS-Branch: master Date: Sat, 28 Jun 2025 15:03:30 +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: 0bc1f499-3daf-402e-af0d-5d69077afbb3 X-Archives-Hash: ec2ea373091833a22b41dcc7577f8144 commit: 36c30e8b89b94866b4205376b1bbf6702247e33e Author: Michał Górny gentoo org> AuthorDate: Sat Jun 28 15:00:50 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Jun 28 15:00:50 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36c30e8b llvm-core/flang: Add 21.0.0_pre20250628 snapshot Signed-off-by: Michał Górny gentoo.org> llvm-core/flang/Manifest | 1 + llvm-core/flang/flang-21.0.0_pre20250628.ebuild | 98 +++++++++++++++++++++++++ 2 files changed, 99 insertions(+) diff --git a/llvm-core/flang/Manifest b/llvm-core/flang/Manifest index 714b2253d6fa..e712fc2c878c 100644 --- a/llvm-core/flang/Manifest +++ b/llvm-core/flang/Manifest @@ -1 +1,2 @@ DIST llvm-project-814ac2e3735e52c1162ac495c24158e0ac256520.tar.gz 237400805 BLAKE2B 59cbf2f7f5c3c1c2c187c72a40b94b05b2d3286678f78764bc7555d75ead40d2fd60b1807bbe6470f012a5958d0466b1f6b2bc842bba36731e7697a79307532b SHA512 63f31f28b7f01b840d88bfa3ffc4107ccffc623b26c7d0dc3e720a864ce7ca907dcbdcfaec7e31a1711220528a89175334518711a83824c82389343c2e4008d7 +DIST llvm-project-e34e02128ec5eb89e36a8f0f7307dcbcfecabbee.tar.gz 238210997 BLAKE2B 80ce4689e3c71a413e36645cdc83590f3492ac3ee39b8bf8844ec50d0b68f40da4c19a7f284625e3550eb78a90d433e74092b5639bcebadf0e0220c36b111cb3 SHA512 5c1ab21b242d1ba62172ae6268a126fd1b049f85b039434b4ff28b0411ec60d46e96e05560b9b85d0420494afdd573b4043999cb34ace508a48f763d4eb5b7aa diff --git a/llvm-core/flang/flang-21.0.0_pre20250628.ebuild b/llvm-core/flang/flang-21.0.0_pre20250628.ebuild new file mode 100644 index 000000000000..8faa9c45706c --- /dev/null +++ b/llvm-core/flang/flang-21.0.0_pre20250628.ebuild @@ -0,0 +1,98 @@ +# 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 toolchain-funcs + +DESCRIPTION="LLVM's Fortran frontend" +HOMEPAGE="https://flang.llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions" +SLOT="${LLVM_MAJOR}/${LLVM_SOABI}" +IUSE="+clang +debug test" +RESTRICT="!test? ( test )" + +DEPEND=" + ~llvm-core/clang-${PV}[debug=] + ~llvm-core/llvm-${PV}[debug=] + ~llvm-core/mlir-${PV}[debug=] +" +RDEPEND=" + ${DEPEND} +" +PDEPEND=" + >=llvm-runtimes/flang-rt-${PV}:${LLVM_MAJOR} +" +BDEPEND=" + clang? ( llvm-core/clang ) + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + ) +" + +LLVM_COMPONENTS=( flang cmake ) +LLVM_TEST_COMPONENTS=( clang/test/Driver mlir/test/lib ) +llvm.org_set_globals + +python_check_deps() { + python_has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + if ! use clang && tc-is-gcc; then + ewarn "Building using GCC requires lots of memory (up to 10 GiB per process)." + ewarn "Consider enabling USE=clang." + ewarn "See https://gcc.gnu.org/PR119705" + fi +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_configure() { + if use clang; then + # Only do this conditionally to allow overriding with + # e.g. CC=clang-13 in case of breakage + if ! tc-is-clang ; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + fi + + strip-unsupported-flags + fi + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}" + + -DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}" + -DCLANG_RESOURCE_DIR="../../../clang/${LLVM_MAJOR}" + + -DBUILD_SHARED_LIBS=OFF + -DMLIR_LINK_MLIR_DYLIB=ON + # flang does not feature a dylib, so do not install libraries + # or headers + -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON + # installed by llvm-runtimes/flang-rt + -DFLANG_INCLUDE_RUNTIME=OFF + + # TODO: always enable to obtain reproducible tools + -DFLANG_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 +}