From 3fdb3b44cddc73dd9a3b26b4f87130ceffa51d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 17 Sep 2026 13:21:11 +0200 Subject: [PATCH] llvm-runtimes/openmp: Enable Fortran tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- llvm-runtimes/openmp/openmp-24.0.0.9999.ebuild | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/llvm-runtimes/openmp/openmp-24.0.0.9999.ebuild b/llvm-runtimes/openmp/openmp-24.0.0.9999.ebuild index fe3273eb31f8f..bb95e86b3c7c7 100644 --- a/llvm-runtimes/openmp/openmp-24.0.0.9999.ebuild +++ b/llvm-runtimes/openmp/openmp-24.0.0.9999.ebuild @@ -113,6 +113,8 @@ multilib_src_configure() { if use fortran; then local -x FC=flang-${LLVM_MAJOR} F77=flang-${LLVM_MAJOR} strip-unsupported-flags + else + local -x FC= F77= fi # LTO causes issues in other packages building, #870127 @@ -186,9 +188,8 @@ multilib_src_configure() { -DLLVM_LIT_ARGS="$(get_lit_flags)" -DOPENMP_TEST_C_COMPILER="$(type -P "${CHOST}-clang-${LLVM_MAJOR}")" -DOPENMP_TEST_CXX_COMPILER="$(type -P "${CHOST}-clang++-${LLVM_MAJOR}")" - # disable Fortran tests for now - # (TODO: enable where we have flang keyworded) - -DOPENMP_TEST_Fortran_COMPILER= + # may be set to empty above + -DOPENMP_TEST_Fortran_COMPILER="${FC}" ) cmake_src_configure } @@ -201,5 +202,12 @@ multilib_src_test() { targets+=( check-offload check-offload-unit ) fi + if use fortran; then + # hack header search around by copying the modules to a directory + # that is already given via -I + cp "${BUILD_DIR}/$(get_libdir)/clang"/*/finclude/flang/*/*.mod \ + "${WORKDIR}/offload/test/" || die + fi + cmake_build "${targets[@]}" }