disable musl for loongarch64

This commit is contained in:
Wenlong Zhang 2024-06-05 08:02:10 +00:00
parent d5d6e44d5e
commit c937cf1951

View File

@ -11,7 +11,7 @@
Name: rust
Version: 1.77.0
Release: 3
Release: 4
Summary: The Rust Programming Language
License: Apache-2.0 OR MIT
URL: https://www.rust-lang.org
@ -44,6 +44,8 @@ Patch1000: embed-riscv64-target-abi-in-bc-when-plugin-_-lto-is-used.pa
arch = "powerpc64le"
elseif arch == "riscv64" then
arch = "riscv64gc"
elseif arch == "loongarch64" then
arch = "loongarch64"
end
return arch.."-unknown-linux-"..abi
end}
@ -332,8 +334,12 @@ test -r "%{profiler}"
%configure --disable-option-checking \
--libdir=%{common_libdir} \
%ifarch loongarch64
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
%else
%{rust_musl_root}=%{musl_root} \
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple},%{rust_musl_triple} \
%endif
--set target.%{rust_triple}.profiler="%{profiler}" \
--python=%{python} \
--local-rust-root=%{local_rust_root} \
@ -431,20 +437,24 @@ export %{rust_env}
%{_libexecdir}/rust-analyzer-proc-macro-srv
%endif
%{rustlibdir}/%{rust_triple}/lib/*.so
%ifnarch loongarch64
%dir %{rustlibdir}/%{rust_musl_triple}
%dir %{rustlibdir}/%{rust_musl_triple}/lib
%endif
%files std-static
%dir %{rustlibdir}
%dir %{rustlibdir}/%{rust_triple}
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.rlib
%ifnarch loongarch64
%dir %{rustlibdir}/%{rust_musl_triple}
%dir %{rustlibdir}/%{rust_musl_triple}/lib
%{rustlibdir}/%{rust_musl_triple}/lib/*.rlib
%{rustlibdir}/%{rust_musl_triple}/lib/self-contained/*.o
%{rustlibdir}/%{rust_musl_triple}/lib/self-contained/libunwind.a
%{rustlibdir}/%{rust_musl_triple}/lib/self-contained/libc.a
%endif
%files debugger-common
%dir %{rustlibdir}
@ -509,6 +519,9 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1*
%changelog
* Wed Jun 05 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 1.77.0-4
- disable musl for loongarch64
* Mon Apr 22 2024 panchenbo <panchenbo@kylinsec.com.cn> - 1.77.0-3
- Modify openEuler to vendor