diff --git a/rust.spec b/rust.spec index c9808ecbc2eeb2dcf2ab95ec96c1a65ec0d4647c..101266bc12d7095aebe75788f186edf6e68fc1d7 100644 --- a/rust.spec +++ b/rust.spec @@ -1,10 +1,14 @@ %global bootstrap_rust 1.82.0 %global bootstrap_cargo 1.82.0 %global bootstrap_channel 1.82.0 -%global bootstrap_date 2024-06-13 +%global bootstrap_date 2024-10-17 %global bootstrap_arches x86_64 aarch64 riscv64 %bcond_with llvm_static +%ifarch x86_64 aarch64 +%bcond_with bundled_llvm +%else %bcond_without bundled_llvm +%endif %bcond_without bundled_libgit2 %bcond_with disabled_libssh2 %bcond_without lldb @@ -22,7 +26,7 @@ Name: rust Version: 1.82.0 -Release: 8 +Release: 9 Summary: The Rust Programming Language License: Apache-2.0 OR MIT URL: https://www.rust-lang.org @@ -120,8 +124,15 @@ BuildRequires: cmake >= 2.8.11 %global llvm_root %{_libdir}/%{llvm} %else # default llvm is decent enough on riscv64 +%ifarch x86_64 aarch64 +%global llvm llvm-toolset-18-llvm +%global llvm_root /opt/openEuler/llvm-toolset-18/root%{_prefix} +%global clang_maj_ver 18 +%else %global llvm llvm %global llvm_root %{_prefix} +%global clang_maj_ver 17 +%endif %endif # Minimum external LLVM for rust 1.82 BuildRequires: %{llvm} >= 17.0.0 @@ -132,8 +143,13 @@ BuildRequires: %{llvm}-static libffi-devel %endif BuildRequires: procps-ng BuildRequires: ninja-build +%ifarch x86_64 aarch64 +BuildRequires: llvm-toolset-18-compiler-rt +BuildRequires: llvm-toolset-18-clang +%else BuildRequires: compiler-rt BuildRequires: clang +%endif Provides: rustc = %{version}-%{release} Provides: rustc%{?_isa} = %{version}-%{release} Requires: %{name}-std-static%{?_isa} = %{version}-%{release} @@ -345,10 +361,9 @@ fi %ifarch ppc64le %global _arch powerpc64le %endif -%global clang_maj_ver 17 %if %{?clang_maj_ver} >= 17 # This is the new one, used on openEuler 24.03 LTS or later -%define profiler %(echo %{_prefix}/%{_lib}/clang/%{clang_maj_ver}/lib/%{_arch}-%{_vendor}-linux-gnu/libclang_rt.profile.a) +%define profiler %(echo %{llvm_root}/%{_lib}/clang/%{clang_maj_ver}/lib/%{_arch}-%{_vendor}-linux-gnu/libclang_rt.profile.a) %else # This is used before openEuler 23.09 %global clang_full_ver %%(clang --version | awk '/clang version/{print $3}') @@ -549,6 +564,9 @@ export %{rust_env} %{_mandir}/man1/cargo*.1* %changelog +* Wed Jan 15 2025 wangkai <13474090681@163.com> - 1.82.0-9 +- Switch to unbundled llvm for x86_64 aarch64 building + * Fri Jan 03 2025 laokz - 1.82.0-8 - fix the error out of memory for riscv64