- Add riscv64 support
This commit is contained in:
parent
26b8067a9b
commit
8504958361
47
llvm.spec
47
llvm.spec
@ -107,7 +107,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly"
|
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly;RISCV"
|
||||||
%global experimental_targets_to_build ""
|
%global experimental_targets_to_build ""
|
||||||
%else
|
%else
|
||||||
%global targets_to_build "all"
|
%global targets_to_build "all"
|
||||||
@ -182,7 +182,7 @@
|
|||||||
#region main package
|
#region main package
|
||||||
Name: %{pkg_name_llvm}
|
Name: %{pkg_name_llvm}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
||||||
Release: 2%{?dist}.alma.1
|
Release: 2%{?dist}.alma.2
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||||
@ -842,7 +842,7 @@ The package contains the LLDB Python module.
|
|||||||
# TODO(kkleine): In clang we had this %ifarch s390 s390x aarch64 %ix86 ppc64le
|
# TODO(kkleine): In clang we had this %ifarch s390 s390x aarch64 %ix86 ppc64le
|
||||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking.
|
# Decrease debuginfo verbosity to reduce memory consumption during final library linking.
|
||||||
%global reduce_debuginfo 0
|
%global reduce_debuginfo 0
|
||||||
%ifarch %ix86
|
%ifarch %ix86 riscv64
|
||||||
%global reduce_debuginfo 1
|
%global reduce_debuginfo 1
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?rhel} == 8
|
%if 0%{?rhel} == 8
|
||||||
@ -867,7 +867,7 @@ export ASMFLAGS="%{build_cflags}"
|
|||||||
|
|
||||||
# Disable dwz on aarch64, because it takes a huge amount of time to decide not to optimize things.
|
# Disable dwz on aarch64, because it takes a huge amount of time to decide not to optimize things.
|
||||||
# This is copied from clang.
|
# This is copied from clang.
|
||||||
%ifarch aarch64
|
%ifarch aarch64 riscv64
|
||||||
%define _find_debuginfo_dwz_opts %{nil}
|
%define _find_debuginfo_dwz_opts %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -959,6 +959,11 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
#endregion lldb options
|
#endregion lldb options
|
||||||
|
|
||||||
|
%global runtimes compiler-rt;openmp
|
||||||
|
%ifnarch riscv64
|
||||||
|
%global runtimes %{runtimes};offload
|
||||||
|
%endif
|
||||||
|
|
||||||
#region llvm options
|
#region llvm options
|
||||||
%global cmake_config_args %{cmake_config_args} \\\
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
-DLLVM_APPEND_VC_REV:BOOL=OFF \\\
|
-DLLVM_APPEND_VC_REV:BOOL=OFF \\\
|
||||||
@ -974,7 +979,7 @@ popd
|
|||||||
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \\\
|
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \\\
|
||||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \\\
|
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \\\
|
||||||
-DLLVM_ENABLE_PROJECTS="%{projects}" \\\
|
-DLLVM_ENABLE_PROJECTS="%{projects}" \\\
|
||||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \\\
|
-DLLVM_ENABLE_RUNTIMES="%{runtimes}" \\\
|
||||||
-DLLVM_ENABLE_ZLIB:BOOL=FORCE_ON \\\
|
-DLLVM_ENABLE_ZLIB:BOOL=FORCE_ON \\\
|
||||||
-DLLVM_ENABLE_ZSTD:BOOL=FORCE_ON \\\
|
-DLLVM_ENABLE_ZSTD:BOOL=FORCE_ON \\\
|
||||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \\\
|
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \\\
|
||||||
@ -1373,7 +1378,7 @@ rm -rf %{buildroot}/%{install_datadir}/gdb
|
|||||||
# chmod go+w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so
|
# chmod go+w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so
|
||||||
# chmod +w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so
|
# chmod +w %{buildroot}/%{_datarootdir}/gdb/python/ompd/ompdModule.so
|
||||||
|
|
||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86} riscv64
|
||||||
# Remove files that we don't package, yet.
|
# Remove files that we don't package, yet.
|
||||||
%if %{maj_ver} >= 20
|
%if %{maj_ver} >= 20
|
||||||
rm %{buildroot}%{install_bindir}/llvm-offload-device-info
|
rm %{buildroot}%{install_bindir}/llvm-offload-device-info
|
||||||
@ -1530,20 +1535,35 @@ function test_list_to_regex()
|
|||||||
#region Test LLVM lit
|
#region Test LLVM lit
|
||||||
# It's fine to always run this, even if we're not shipping python-lit.
|
# It's fine to always run this, even if we're not shipping python-lit.
|
||||||
reset_test_opts
|
reset_test_opts
|
||||||
|
%ifnarch riscv64
|
||||||
%cmake_build --target check-lit
|
%cmake_build --target check-lit
|
||||||
|
%endif
|
||||||
#endregion Test LLVM lit
|
#endregion Test LLVM lit
|
||||||
|
|
||||||
#region Test LLVM
|
#region Test LLVM
|
||||||
reset_test_opts
|
reset_test_opts
|
||||||
# Xfail testing of update utility tools
|
# Xfail testing of update utility tools
|
||||||
export LIT_XFAIL="tools/UpdateTestChecks"
|
export LIT_XFAIL="tools/UpdateTestChecks"
|
||||||
|
%ifnarch riscv64
|
||||||
%cmake_build --target check-llvm
|
%cmake_build --target check-llvm
|
||||||
|
%endif
|
||||||
#endregion Test LLVM
|
#endregion Test LLVM
|
||||||
|
|
||||||
#region Test CLANG
|
#region Test CLANG
|
||||||
reset_test_opts
|
reset_test_opts
|
||||||
export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c"
|
export LIT_XFAIL="$LIT_XFAIL;clang/test/CodeGen/profile-filter.c"
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;clang/test/OpenMP/declare_variant_device_isa_codegen_1.c"
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;OpenMP/declare_variant_device_isa_codegen_1.c"
|
||||||
|
test_list_filter_out+=("Clang :: OpenMP/declare_variant_device_isa_codegen_1.c")
|
||||||
|
%endif
|
||||||
|
|
||||||
|
export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
||||||
|
|
||||||
|
%ifnarch riscv64
|
||||||
%cmake_build --target check-clang
|
%cmake_build --target check-clang
|
||||||
|
%endif
|
||||||
#endregion Test Clang
|
#endregion Test Clang
|
||||||
|
|
||||||
#region Test Clang Tools
|
#region Test Clang Tools
|
||||||
@ -1552,7 +1572,9 @@ reset_test_opts
|
|||||||
# Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp
|
# Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp
|
||||||
export LIT_XFAIL="$LIT_XFAIL;clang-tidy/checkers/altera/struct-pack-align.cpp"
|
export LIT_XFAIL="$LIT_XFAIL;clang-tidy/checkers/altera/struct-pack-align.cpp"
|
||||||
%endif
|
%endif
|
||||||
|
%ifnarch riscv64
|
||||||
%cmake_build --target check-clang-tools
|
%cmake_build --target check-clang-tools
|
||||||
|
%endif
|
||||||
#endregion Test Clang Tools
|
#endregion Test Clang Tools
|
||||||
|
|
||||||
#region Test OPENMP
|
#region Test OPENMP
|
||||||
@ -1721,7 +1743,7 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
|||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
# libomp tests are often very slow on s390x brew builders
|
# libomp tests are often very slow on s390x brew builders
|
||||||
%ifnarch s390x
|
%ifnarch s390x riscv64
|
||||||
%cmake_build --target check-openmp
|
%cmake_build --target check-openmp
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
@ -1753,7 +1775,9 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
|||||||
|
|
||||||
#region Test LLD
|
#region Test LLD
|
||||||
reset_test_opts
|
reset_test_opts
|
||||||
|
%ifnarch riscv64
|
||||||
%cmake_build --target check-lld
|
%cmake_build --target check-lld
|
||||||
|
%endif
|
||||||
#endregion Test LLD
|
#endregion Test LLD
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
@ -2399,7 +2423,7 @@ fi
|
|||||||
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtend.o
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtend.o
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch %{ix86} s390x
|
%ifnarch %{ix86} s390x riscv64
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -2417,7 +2441,7 @@ fi
|
|||||||
%{install_libdir}/libomp.so
|
%{install_libdir}/libomp.so
|
||||||
%{install_libdir}/libompd.so
|
%{install_libdir}/libompd.so
|
||||||
%{install_libdir}/libarcher.so
|
%{install_libdir}/libarcher.so
|
||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86} riscv64
|
||||||
# libomptarget is not supported on 32-bit systems.
|
# libomptarget is not supported on 32-bit systems.
|
||||||
# s390x does not support the offloading plugins.
|
# s390x does not support the offloading plugins.
|
||||||
%{install_libdir}/libomptarget.so.%{so_suffix}
|
%{install_libdir}/libomptarget.so.%{so_suffix}
|
||||||
@ -2431,7 +2455,7 @@ fi
|
|||||||
%{_prefix}/lib/clang/%{maj_ver}/include/ompt.h
|
%{_prefix}/lib/clang/%{maj_ver}/include/ompt.h
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h
|
%{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h
|
||||||
%{install_libdir}/cmake/openmp/
|
%{install_libdir}/cmake/openmp/
|
||||||
%ifnarch %{ix86}
|
%ifnarch %{ix86} riscv64
|
||||||
# libomptarget is not supported on 32-bit systems.
|
# libomptarget is not supported on 32-bit systems.
|
||||||
# s390x does not support the offloading plugins.
|
# s390x does not support the offloading plugins.
|
||||||
%{install_libdir}/libomptarget.devicertl.a
|
%{install_libdir}/libomptarget.devicertl.a
|
||||||
@ -2518,6 +2542,9 @@ fi
|
|||||||
|
|
||||||
#region changelog
|
#region changelog
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 04 2025 Eduard Abdullin <eabdullin@almalinux.org> - 19.1.7-2.alma.2
|
||||||
|
- Add riscv64 support
|
||||||
|
|
||||||
* Fri Jan 24 2025 Eduard Abdullin <eabdullin@almalinux.org> - 19.1.7-2.alma.1
|
* Fri Jan 24 2025 Eduard Abdullin <eabdullin@almalinux.org> - 19.1.7-2.alma.1
|
||||||
- Use x86_64-redhat-linux as default gcc triple for x86_64_v2
|
- Use x86_64-redhat-linux as default gcc triple for x86_64_v2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user