diff --git a/0006-openmp-LoongArch-Fix-compile-error-after-commit-5298.patch b/0006-openmp-LoongArch-Fix-compile-error-after-commit-5298.patch new file mode 100644 index 0000000000000000000000000000000000000000..3d4c73c8e98a53f325008a236f4f7cb7b294bf10 --- /dev/null +++ b/0006-openmp-LoongArch-Fix-compile-error-after-commit-5298.patch @@ -0,0 +1,26 @@ +From 256de0c8f68e8dc906256a2eecea0a53229966b0 Mon Sep 17 00:00:00 2001 +From: chenli +Date: Fri, 9 May 2025 15:32:29 +0800 +Subject: [PATCH] [openmp][LoongArch] Fix compile error after commit + 5298e93560ddd + +--- + openmp/runtime/src/kmp_platform.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/openmp/runtime/src/kmp_platform.h b/openmp/runtime/src/kmp_platform.h +index 780ff3b185b3..d9fa8a7a4a91 100644 +--- a/openmp/runtime/src/kmp_platform.h ++++ b/openmp/runtime/src/kmp_platform.h +@@ -210,7 +210,7 @@ + // TODO: Fixme - This is clever, but really fugly + #if (1 != KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 + \ + KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64 + \ +- KMP_ARCH_RISCV64 + KMP_ARCH_LOONGARCH6464 + KMP_ARCH_SW64) ++ KMP_ARCH_RISCV64 + KMP_ARCH_LOONGARCH64 + KMP_ARCH_SW64) + #error Unknown or unsupported architecture + #endif + +-- +2.20.1 + diff --git a/llvm.spec b/llvm.spec index 256c1c3bd4e61587d6690d2acfb3af61418103a4..88d299d2e54aaaedaf8fc0d0e47f27656a465d31 100644 --- a/llvm.spec +++ b/llvm.spec @@ -151,7 +151,7 @@ Name: llvm Name: llvm-toolset-%{maj_ver} %endif Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 38 +Release: 39 Summary: The Low Level Virtual Machine License: NCSA @@ -173,6 +173,7 @@ Patch0004: 0004-remove-cmake_minimum_required.patch %if %{with bisheng_autotuner} Patch0005: 0005-Fix-for-building-autotuner-with-mlir.patch %endif +Patch0006: 0006-openmp-LoongArch-Fix-compile-error-after-commit-5298.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -1905,6 +1906,33 @@ export LIT_XFAIL="$LIT_XFAIL;mlir-pdll-lsp-server/view-output.test" export LIT_XFAIL="$LIT_XFAIL;Target/LLVMIR/arm-sme.mlir" +# Following testcases depend on MCJIT which is not supported on LoongArch. +%ifarch loongarch64 +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/async-error.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/async-func.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/async-group.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/async-value.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/async.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/bare-ptr-call-conv.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/copy.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/expand-arith-ops.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/global-memref.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/math-polynomial-approx.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/memref-reinterpret-cast.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/memref-reshape.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/print.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/sgemm-naive-codegen.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/simple.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/test-expand-math-approx.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/unranked-memref.mlir" +export LIT_XFAIL="$LIT_XFAIL;mlir-cpu-runner/utils.mlir" +export LIT_XFAIL="$LIT_XFAIL;ExecutionEngine/./MLIRExecutionEngineTests/4/10" +export LIT_XFAIL="$LIT_XFAIL;ExecutionEngine/./MLIRExecutionEngineTests/5/10" +export LIT_XFAIL="$LIT_XFAIL;ExecutionEngine/./MLIRExecutionEngineTests/6/10" +export LIT_XFAIL="$LIT_XFAIL;ExecutionEngine/./MLIRExecutionEngineTests/7/10" +export LIT_XFAIL="$LIT_XFAIL;ExecutionEngine/./MLIRExecutionEngineTests/8/10" +export LIT_XFAIL="$LIT_XFAIL;ExecutionEngine/./MLIRExecutionEngineTests/9/10" +%endif # The ml_dtypes python module required by mlir/test/python/execution_engine.py # isn't packaged. test_list_filter_out+=("MLIR :: python/execution_engine.py") @@ -2568,7 +2596,7 @@ fi %{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtend.o %endif -%ifnarch %{ix86} s390x riscv64 +%ifnarch %{ix86} s390x riscv64 loongarch64 %{install_libdir}/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a %endif @@ -2621,7 +2649,7 @@ fi %ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%ifnarch riscv64 +%ifnarch riscv64 loongarch64 %{install_libdir}/libomptarget.rtl.amdgpu.so %{install_libdir}/libomptarget.rtl.cuda.so %{install_libdir}/libomptarget.rtl.%{libomp_arch}.so @@ -2852,6 +2880,12 @@ fi #endregion files %changelog +* Thu May 08 2025 chenli - 17.0.6-39 +- LoongArch: Fix mlir testcases which depend on MCJIT +- LoongArch: Fix liborc_rt.a file not found +- LoongArch: Fix openmp build +- LoongArch: Fix libomptarget.rtl.amdgpu|cuda|loonarch64.so file not found + * Thu May 08 2025 liyunfei - 17.0.6-38 - update to llvm-for-oe-17.0.6-2506.0.1 - release-note https://gitee.com/openeuler/llvm-project/compare/llvm-for-oE-17.0.6-2503.0.2...llvm-for-oE-17.0.6-2506.0.1