public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/llvm] rawhide: Fix fortran test failures on riscv64
@ 2026-10-06 12:29 Tulio Magno Quites Machado Filho
  0 siblings, 0 replies; only message in thread
From: Tulio Magno Quites Machado Filho @ 2026-10-06 12:29 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/llvm
            Branch : rawhide
            Commit : 2d25602ee51bafe0f581c0a5e5133344c60fe503
            Author : Tulio Magno Quites Machado Filho <tuliom@redhat.com>
            Date   : 2026-10-06T09:27:28-03:00
            Stats  : +56/-8 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/llvm/c/2d25602ee51bafe0f581c0a5e5133344c60fe503?branch=rawhide

            Log:
            Fix fortran test failures on riscv64

Backport a patch from LLVM 24 that adds the riscv64 redhat triples.

---
diff --git a/228450-llvm22.patch b/228450-llvm22.patch
new file mode 100644
index 0000000..a50a4d6
--- /dev/null
+++ b/228450-llvm22.patch
@@ -0,0 +1,19 @@
+diff --git i/clang/lib/Driver/ToolChains/Gnu.cpp w/clang/lib/Driver/ToolChains/Gnu.cpp
+index 7591d9f7fa41..90fc71c14736 100644
+--- i/clang/lib/Driver/ToolChains/Gnu.cpp
++++ w/clang/lib/Driver/ToolChains/Gnu.cpp
+@@ -2456,10 +2456,12 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+ 
+   static const char *const RISCV32LibDirs[] = {"/lib32", "/lib"};
+   static const char *const RISCV32Triples[] = {"riscv32-unknown-linux-gnu",
+-                                               "riscv32-unknown-elf"};
++                                               "riscv32-unknown-elf",
++                                               "riscv32-redhat-linux"};
+   static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
+   static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
+-                                               "riscv64-unknown-elf"};
++                                               "riscv64-unknown-elf",
++                                               "riscv64-redhat-linux"};
+ 
+   static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
+   static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",

diff --git a/228450.patch b/228450.patch
new file mode 100644
index 0000000..aee861b
--- /dev/null
+++ b/228450.patch
@@ -0,0 +1,32 @@
+From f9f82f8671079ca37a52b771997700050ecd1ae6 Mon Sep 17 00:00:00 2001
+From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
+Date: Wed, 30 Sep 2026 17:40:56 -0300
+Subject: [PATCH] [Driver][RISCV] Add the riscv*-redhat-linux triples
+
+Add the redhat vendor triples for riscv*.
+
+This is particularly important when running tests because there is no
+way to set compiler flags that are inherited by tests.
+---
+ clang/lib/Driver/ToolChains/Gnu.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
+index 7591d9f7fa418..90fc71c147364 100644
+--- a/clang/lib/Driver/ToolChains/Gnu.cpp
++++ b/clang/lib/Driver/ToolChains/Gnu.cpp
+@@ -2456,10 +2456,12 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
+ 
+   static const char *const RISCV32LibDirs[] = {"/lib32", "/lib"};
+   static const char *const RISCV32Triples[] = {"riscv32-unknown-linux-gnu",
+-                                               "riscv32-unknown-elf"};
++                                               "riscv32-unknown-elf",
++                                               "riscv32-redhat-linux"};
+   static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
+   static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
+-                                               "riscv64-unknown-elf"};
++                                               "riscv64-unknown-elf",
++                                               "riscv64-redhat-linux"};
+ 
+   static const char *const RISCV32beLibDirs[] = {"/lib32", "/lib"};
+   static const char *const RISCV32beTriples[] = {"riscv32be-unknown-linux-gnu",

diff --git a/llvm.spec b/llvm.spec
index f45c140..1863304 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -559,6 +559,11 @@ Patch2402: 0001-24-Workaround-a-bug-in-ORC-on-ppc64le.patch
 # With the introduction of --gcc-include-dir in the clang config file,
 # this might no longer be needed.
 Patch104: 0001-Driver-Give-devtoolset-path-precedence-over-Installe.patch
+
+# Add support for riscv64 triples.
+# https://github.com/llvm/llvm-project/pull/228450
+Patch2202: 228450-llvm22.patch
+Patch2302: 228450.patch
 #endregion CLANG patches
 
 # Fix lit tests for Python 3.15+ https://bugzilla.redhat.com/show_bug.cgi?id=2448969
@@ -2961,14 +2966,6 @@ export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c"
 # The following tests are flaky and we'll filter them out.
 test_list_filter_out+=("libomp :: affinity/kmp-affinity.c")
 test_list_filter_out+=("libomp :: affinity/omp-places.c")
-
-# The following tests fail due to an issue downstream.
-export LIT_XFAIL="$LIT_XFAIL;transform/fuse/do-looprange.f90"
-export LIT_XFAIL="$LIT_XFAIL;transform/fuse/do.f90"
-export LIT_XFAIL="$LIT_XFAIL;transform/tile/do.F90"
-export LIT_XFAIL="$LIT_XFAIL;transform/tile/do_2d.f90"
-export LIT_XFAIL="$LIT_XFAIL;transform/tile/do_2d_varsizes.f90"
-export LIT_XFAIL="$LIT_XFAIL;transform/unroll/heuristic_do.f90"
 %endif
 
 adjust_lit_filter_out test_list_filter_out

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-06 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 12:29 [rpms/llvm] rawhide: Fix fortran test failures on riscv64 Tulio Magno Quites Machado Filho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox