Enable riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
f50b7f0c26
commit
7ad16ae275
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||||
|
index 3cb0eccd3..933cf84fc 100644
|
||||||
|
--- a/src/bootstrap/dist.rs
|
||||||
|
+++ b/src/bootstrap/dist.rs
|
||||||
|
@@ -1129,12 +1129,6 @@ impl Step for RustAnalyzer {
|
||||||
|
let compiler = self.compiler;
|
||||||
|
let target = self.target;
|
||||||
|
|
||||||
|
- if target.contains("riscv64") {
|
||||||
|
- // riscv64 currently has an LLVM bug that makes rust-analyzer unable
|
||||||
|
- // to build. See #74813 for details.
|
||||||
|
- return None;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
let rust_analyzer = builder
|
||||||
|
.ensure(tool::RustAnalyzer { compiler, target })
|
||||||
|
.expect("rust-analyzer always builds");
|
17
rust.spec
17
rust.spec
|
@ -1,6 +1,6 @@
|
||||||
# Only x86_64 and i686 are Tier 1 platforms at this time.
|
# Only x86_64 and i686 are Tier 1 platforms at this time.
|
||||||
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
|
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
|
||||||
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64le s390x
|
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64le s390x riscv64
|
||||||
|
|
||||||
# The channel can be stable, beta, or nightly
|
# The channel can be stable, beta, or nightly
|
||||||
%{!?channel: %global channel stable}
|
%{!?channel: %global channel stable}
|
||||||
|
@ -76,15 +76,19 @@
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# LLDB isn't available everywhere...
|
# LLDB isn't available everywhere...
|
||||||
|
%ifnarch riscv64
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||||
%bcond_with lldb
|
%bcond_with lldb
|
||||||
%else
|
%else
|
||||||
%bcond_without lldb
|
%bcond_without lldb
|
||||||
%endif
|
%endif
|
||||||
|
%else
|
||||||
|
%bcond_with lldb
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.67.1
|
Version: 1.67.1
|
||||||
Release: 1%{?dist}
|
Release: 1.0.riscv64%{?dist}
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||||
# ^ written as: (rust itself) and (bundled libraries)
|
# ^ written as: (rust itself) and (bundled libraries)
|
||||||
|
@ -126,6 +130,8 @@ Patch101: rustc-1.67.0-disable-http2.patch
|
||||||
# (affects RHEL6 kernels when building for RHEL7)
|
# (affects RHEL6 kernels when building for RHEL7)
|
||||||
Patch102: rustc-1.65.0-no-default-pie.patch
|
Patch102: rustc-1.65.0-no-default-pie.patch
|
||||||
|
|
||||||
|
# Enable rust-analyzer on riscv64
|
||||||
|
Patch103: rust-enable-ra-for-riscv64.patch
|
||||||
|
|
||||||
# Get the Rust triple for any arch.
|
# Get the Rust triple for any arch.
|
||||||
%{lua: function rust_triple(arch)
|
%{lua: function rust_triple(arch)
|
||||||
|
@ -599,6 +605,8 @@ rm -rf vendor/libnghttp2-sys/
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch103 -p1
|
||||||
|
|
||||||
# Use our explicit python3 first
|
# Use our explicit python3 first
|
||||||
sed -i.try-python -e '/^try python3 /i try "%{__python3}" "$@"' ./configure
|
sed -i.try-python -e '/^try python3 /i try "%{__python3}" "$@"' ./configure
|
||||||
|
|
||||||
|
@ -669,7 +677,7 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
||||||
%build
|
%build
|
||||||
%{export_rust_env}
|
%{export_rust_env}
|
||||||
|
|
||||||
%ifarch %{arm} %{ix86}
|
%ifarch %{arm} %{ix86} riscv64
|
||||||
# full debuginfo is exhausting memory; just do libstd for now
|
# full debuginfo is exhausting memory; just do libstd for now
|
||||||
# https://github.com/rust-lang/rust/issues/45854
|
# https://github.com/rust-lang/rust/issues/45854
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||||
|
@ -1040,6 +1048,9 @@ end}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 17 2023 David Abdurachmanov <davidlt@rivosinc.com> - 1.67.1-1.0.riscv64
|
||||||
|
- Enable riscv64
|
||||||
|
|
||||||
* Thu Feb 09 2023 Josh Stone <jistone@redhat.com> - 1.67.1-1
|
* Thu Feb 09 2023 Josh Stone <jistone@redhat.com> - 1.67.1-1
|
||||||
- Update to 1.67.1.
|
- Update to 1.67.1.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue