diff --git a/rust-1.82.0-loongarch64-unknown-linux-gnu.tar.xz b/rust-1.82.0-loongarch64-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..5cc89de1b4be667a3f90749fe6f2f81e916389b3 --- /dev/null +++ b/rust-1.82.0-loongarch64-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60508db0879fcb4b1ff0d254bce6352a929857bcebdd6a0ddd8b32d92672684f +size 214922428 diff --git a/rust.spec b/rust.spec index 4421d9b6e3fada5f8a8e366ecbd96b186498257b..9ee8f9c8db878dd08f031b1b373b2bea461d3f14 100644 --- a/rust.spec +++ b/rust.spec @@ -2,9 +2,9 @@ %global bootstrap_cargo 1.82.0 %global bootstrap_channel 1.82.0 %global bootstrap_date 2024-10-17 -%global bootstrap_arches x86_64 aarch64 riscv64 +%global bootstrap_arches x86_64 aarch64 riscv64 loongarch64 %bcond_with llvm_static -%ifarch x86_64 aarch64 riscv64 +%ifarch x86_64 aarch64 riscv64 loongarch64 %bcond_with bundled_llvm %else %bcond_without bundled_llvm @@ -12,7 +12,6 @@ %bcond_without bundled_libgit2 %bcond_with disabled_libssh2 %bcond_without lldb -%bcond_without analyzer # disable rust-lld (enabled by default on x86 since 1.80.0 via pull/124129) for # building with system llvm (17.0.6) # https://github.com/rust-lang/rust/issues/131291 @@ -26,7 +25,7 @@ Name: rust Version: 1.82.0 -Release: 14 +Release: 15 Summary: The Rust Programming Language License: Apache-2.0 OR MIT URL: https://www.rust-lang.org @@ -126,7 +125,7 @@ BuildRequires: cmake >= 2.8.11 %global llvm_root %{_libdir}/%{llvm} %else # default llvm is decent enough on riscv64 -%ifarch x86_64 aarch64 riscv64 +%ifarch x86_64 aarch64 riscv64 loongarch64 %global llvm llvm-toolset-18-llvm %global llvm_root /opt/%{_vendor}/llvm-toolset-18/root%{_prefix} %global clang_maj_ver 18 @@ -145,7 +144,7 @@ BuildRequires: %{llvm}-static libffi-devel %endif BuildRequires: procps-ng BuildRequires: ninja-build -%ifarch x86_64 aarch64 riscv64 +%ifarch x86_64 aarch64 riscv64 loongarch64 BuildRequires: llvm-toolset-18-compiler-rt BuildRequires: llvm-toolset-18-clang %else @@ -233,7 +232,6 @@ Conflicts: rustfmt-preview < 1.0.0 %description -n rustfmt A tool for formatting Rust code according to style guidelines. -%if %{with analyzer} %package analyzer Summary:Rust implementation of the Language Server Protocol Requires: %{name}-src @@ -247,7 +245,6 @@ Requires: %{name} = %{version}-%{release} rust-analyzer is an implementation of Language Server Protocol for the Rust programming language. It provides features like completion and goto definition for many code editors, including VS Code, Emacs and Vim. -%endif %package -n clippy Summary: Lints to catch common mistakes and improve your Rust code @@ -275,13 +272,11 @@ Obsoletes: %{name}-doc < %{version}-%{release} %{name}-cargo-doc < %{version}- Man pages and other related help documents for rust. %prep -# download source0 and gpg check -#wget -qO %{SOURCE0} https://user-repo.openeuler.openatom.cn/lfs-tar/rust/rustc-%{version}-src.tar.xz +# gpg check gpg --import %{SOURCE2} gpg --verify %{SOURCE1} %{SOURCE0} %ifarch %{bootstrap_arches} -#wget -qO %{_sourcedir}/%{bootstrap_root}.tar.xz https://user-repo.openeuler.openatom.cn/lfs-tar/rust/%{bootstrap_root}.tar.xz %setup -q -n %{bootstrap_root} -T -b %{bootstrap_source} ./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \ --prefix=%{local_rust_root} --disable-ldconfig @@ -390,7 +385,7 @@ test -r "%{profiler}" --disable-rpath \ %{enable_debuginfo} \ --enable-extended \ - --tools=cargo,clippy,%{?with_analyzer:rls,rust-analyzer,}rustfmt,src \ + --tools=cargo,clippy,rust-analyzer,rustfmt,src \ --enable-vendor \ --enable-verbose-tests \ %{?codegen_units_std} \ @@ -446,11 +441,6 @@ install -m 0644 -D -p %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.cargo/config.t install -m 0644 -D -p %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/cargo-config.sh install -m 0644 -D -p %{SOURCE5} %{buildroot}%{_sysconfdir}/profile.d/cargo-config.csh -%if %{with analyzer} -# The rls stub doesn't have an install target, but we can just copy it. -%{__install} -t %{buildroot}%{_bindir} build/%{rust_triple}/stage2-tools-bin/rls -%endif - %if %without lldb rm -f %{buildroot}%{_bindir}/rust-lldb rm -f %{buildroot}%{rustlibdir}/etc/lldb_* @@ -466,9 +456,7 @@ export %{rust_env} %endif %{python} ./x.py test --no-fail-fast --stage 2 cargo %{?cargo_test_skip} || : %{python} ./x.py test --no-fail-fast --stage 2 clippy || : -%if %{with analyzer} %{python} ./x.py test --no-fail-fast --stage 2 rust-analyzer || : -%endif %{python} ./x.py test --no-fail-fast --stage 2 rustfmt || : %ldconfig_scriptlets @@ -482,9 +470,7 @@ export %{rust_env} %dir %{rustlibdir} %dir %{rustlibdir}/%{rust_triple} %dir %{rustlibdir}/%{rust_triple}/lib -%if %{with analyzer} %{_libexecdir}/rust-analyzer-proc-macro-srv -%endif %{rustlibdir}/%{rust_triple}/lib/*.so %if %{with musl_target} %dir %{rustlibdir}/%{rust_musl_triple} @@ -538,13 +524,10 @@ export %{rust_env} %doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md %license src/tools/rustfmt/LICENSE-{APACHE,MIT} -%if %{with analyzer} %files analyzer -%{_bindir}/rls %{_bindir}/rust-analyzer %doc src/tools/rust-analyzer/README.md %license src/tools/rust-analyzer/LICENSE-{APACHE,MIT} -%endif %files -n clippy %{_bindir}/cargo-clippy @@ -568,6 +551,10 @@ export %{rust_env} %{_mandir}/man1/cargo*.1* %changelog +* Wed Sep 24 2025 wangkai <13474090681@163.com> - 1.82.0-15 +- Remove rls command +- Cleanup spec + * Tue Sep 23 2025 eshiner - 1.82.0-14 - Support HARDCODE_NO to disable lse atomic