diff --git a/0005-backport-Disable-InterpreterExceptionTest-on-RISC-V.patch b/0005-backport-Disable-InterpreterExceptionTest-on-RISC-V.patch new file mode 100644 index 0000000000000000000000000000000000000000..4805455536041fc0f47d5f83f59041083fcc739d --- /dev/null +++ b/0005-backport-Disable-InterpreterExceptionTest-on-RISC-V.patch @@ -0,0 +1,46 @@ +From 8943c1fb16c225f056e93c3a9a1bbeb535370e4e Mon Sep 17 00:00:00 2001 +From: laokz +Date: Fri, 1 Mar 2024 06:14:24 +0000 +Subject: [PATCH] [backport] Disable InterpreterExceptionTest on RISC-V + Reference: + https://github.com/llvm/llvm-project/commit/ca003ee06d0eac7e8facc179181298a05e4d03ed + +Signed-off-by: laokz +--- + +From ca003ee06d0eac7e8facc179181298a05e4d03ed Mon Sep 17 00:00:00 2001 +From: Alex Bradbury +Date: Wed, 4 Oct 2023 14:33:31 +0100 +Subject: [PATCH] [clang-repl] Disable InterpreterExceptionTest on RISC-V + (#68216) + +This test fails as .eh_frame handling is not yet implemented for RISC-V +in JITLink. #66067 is proposed to address this. + +Skip the test until the issue is resolved. It seems that D159167 enabled +this test for more than just ppc64. As the test always failed, it just +wasn't run until now, I think skipping is the correct interim approach +(as is already done for Arm, Darwin, and others). +--- + .../Interpreter/ExceptionTests/InterpreterExceptionTest.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp +index 70e10b1e53..3857b75598 100644 +--- a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp ++++ b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp +@@ -114,6 +114,11 @@ extern "C" int throw_exception() { + Triple.getArch() == llvm::Triple::aarch64_32)) + GTEST_SKIP(); + ++ // FIXME: RISC-V fails as .eh_frame handling is not yet implemented in ++ // JITLink for RISC-V. See PR #66067. ++ if (Triple.isRISCV()) ++ GTEST_SKIP(); ++ + llvm::cantFail(Interp->ParseAndExecute(ExceptionCode)); + testing::internal::CaptureStdout(); + auto ThrowException = +-- +2.43.0 + diff --git a/clang.spec b/clang.spec index c37d1ea4c70854f6316166dc9c4c9907927f99a2..e6877bc5a7c219e4034527364146608f554d6416 100644 --- a/clang.spec +++ b/clang.spec @@ -36,7 +36,7 @@ Name: %{pkg_name} Version: %{clang_version} -Release: 6 +Release: 7 Summary: A C language family front-end for LLVM License: NCSA @@ -49,6 +49,7 @@ Patch1: 0001-Add-triples-for-X86_64-AArch64-Riscv64-openEuler-gcc.patch Patch2: 0002-Revert-Clang-Change-the-default-DWARF-version-to-5.patch Patch3: 0003-add-BUILD_FOR_OPENEULER-build-option-to-clang.patch Patch4: 0004-add-gcc-compatible-in-BUILD_FOR_OPENEULER.patch +Patch5: 0005-backport-Disable-InterpreterExceptionTest-on-RISC-V.patch # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -377,6 +378,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build %{install_bindir}/git-clang-format %changelog +* Fri Mar 1 2024 laokz -17.0.6-7 +- riscv64: backport 18.1.0 patch to disable unsupported test + * Thu Feb 22 2024 liyunfei -17.0.6-6 - Add BUILD_FOR_OPENEULER to clang