Skip to content

Commit cc8d5c4

Browse files
MingcongBaijiegec
authored andcommitted
rustc: update to 1.82.0
- Track patches at AOSC-Tracking/rustc @ aosc/v1.82.0. - Build with LLVM 19 due to a bug affecting LoongArch and RISC-V. Link: rust-lang/rust#129268
1 parent 28e3240 commit cc8d5c4

5 files changed

+69
-12
lines changed

lang-rust/rustc/autobuild/defines

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
PKGNAME=rustc
22
PKGEPOCH=1
33
PKGSEC=devel
4-
PKGDEP="gcc-runtime llvm-runtime http-parser"
5-
BUILDDEP="cmake curl libffi llvm ninja rustc"
4+
PKGDEP="gcc-runtime llvm-runtime-19 http-parser"
5+
BUILDDEP="cmake curl libffi llvm-19 ninja rustc"
66
PKGDES="General purpose, multi-paradigm programming language (compiler and runtime)"
77

88
NOLTO=1

lang-rust/rustc/autobuild/patches/0001-Add-i486-unknown-linux-gnu-compiler-target.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 1e21011f5612a2ae77e363217060513572b379f6 Mon Sep 17 00:00:00 2001
1+
From 6dfb63cb3d31e7ccff3893e417c411f6d3100f1e Mon Sep 17 00:00:00 2001
22
From: Jiajie Chen <[email protected]>
33
Date: Fri, 9 Feb 2024 18:48:33 -0800
4-
Subject: [PATCH 1/2] Add i486-unknown-linux-gnu compiler target
4+
Subject: [PATCH 1/3] Add i486-unknown-linux-gnu compiler target
55

66
---
77
compiler/rustc_target/src/spec/mod.rs | 1 +
@@ -10,10 +10,10 @@ Subject: [PATCH 1/2] Add i486-unknown-linux-gnu compiler target
1010
create mode 100644 compiler/rustc_target/src/spec/targets/i486_unknown_linux_gnu.rs
1111

1212
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
13-
index 607eeac7cc..6278e69006 100644
13+
index d5f227a84a..32e01bad6a 100644
1414
--- a/compiler/rustc_target/src/spec/mod.rs
1515
+++ b/compiler/rustc_target/src/spec/mod.rs
16-
@@ -1542,6 +1542,7 @@ supported_targets! {
16+
@@ -1545,6 +1545,7 @@ supported_targets! {
1717
("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
1818
("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
1919
("i586-unknown-linux-gnu", i586_unknown_linux_gnu),
@@ -36,5 +36,5 @@ index 0000000000..a11fbecc3c
3636
+ base
3737
+}
3838
--
39-
2.46.0
39+
2.47.0
4040

lang-rust/rustc/autobuild/patches/0002-Add-MIPS-definitions-to-vendored-libffi-sys.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 9f944a0e2c7ee6a5fee1ff41c793291712a482bf Mon Sep 17 00:00:00 2001
1+
From 93896c7954036ce393f7364583b75f557f44465c Mon Sep 17 00:00:00 2001
22
From: Jiajie Chen <[email protected]>
33
Date: Fri, 9 Feb 2024 18:48:40 -0800
4-
Subject: [PATCH 2/2] Add MIPS definitions to vendored libffi-sys
4+
Subject: [PATCH 2/3] Add MIPS definitions to vendored libffi-sys
55

66
---
77
vendor/libffi-sys-2.3.0/.cargo-checksum.json | 2 +-
@@ -90,5 +90,5 @@ index e8fd86d03d..f3eb03ca3c 100644
9090

9191
impl Default for ffi_cif {
9292
--
93-
2.46.0
93+
2.47.0
9494

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
From 84386164e3c2c6ac5348040bb2b662310127134e Mon Sep 17 00:00:00 2001
2+
From: Mingcong Bai <[email protected]>
3+
Date: Fri, 18 Oct 2024 14:51:44 +0800
4+
Subject: [PATCH 3/3] Revert "Add f16/f128 handling in a couple places"
5+
6+
The f16/f128 handling introduced as part of rust-lang/rustc#125016 (Update
7+
compiler_builtins to 0.1.114) broke compilation on LoongArch and RISC-V:
8+
9+
error: internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs:
10+
126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }
11+
12+
thread 'rustc' panicked at compiler/rustc_codegen_llvm/src/abi.rs:126:22:
13+
Box<dyn Any>
14+
15+
This should be resolved with LLVM 19, but we are still on LLVM 18.
16+
17+
Revert 99e6a28804eac57faa37134d61a2bb17069996a2 as a temporary workaround.
18+
19+
Ref: https://github.com/rust-lang/rust/pull/125016
20+
---
21+
compiler/rustc_codegen_llvm/src/abi.rs | 2 --
22+
compiler/rustc_target/src/abi/call/mod.rs | 2 --
23+
2 files changed, 4 deletions(-)
24+
25+
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs
26+
index dea574a53c..6d1bfb42e4 100644
27+
--- a/compiler/rustc_codegen_llvm/src/abi.rs
28+
+++ b/compiler/rustc_codegen_llvm/src/abi.rs
29+
@@ -120,10 +120,8 @@ impl LlvmType for Reg {
30+
match self.kind {
31+
RegKind::Integer => cx.type_ix(self.size.bits()),
32+
RegKind::Float => match self.size.bits() {
33+
- 16 => cx.type_f16(),
34+
32 => cx.type_f32(),
35+
64 => cx.type_f64(),
36+
- 128 => cx.type_f128(),
37+
_ => bug!("unsupported float: {:?}", self),
38+
},
39+
RegKind::Vector => cx.type_vector(cx.type_i8(), self.size.bytes()),
40+
diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs
41+
index 082c169b21..78a8de9813 100644
42+
--- a/compiler/rustc_target/src/abi/call/mod.rs
43+
+++ b/compiler/rustc_target/src/abi/call/mod.rs
44+
@@ -238,10 +238,8 @@ impl Reg {
45+
_ => panic!("unsupported integer: {self:?}"),
46+
},
47+
RegKind::Float => match self.size.bits() {
48+
- 16 => dl.f16_align.abi,
49+
32 => dl.f32_align.abi,
50+
64 => dl.f64_align.abi,
51+
- 128 => dl.f128_align.abi,
52+
_ => panic!("unsupported float: {self:?}"),
53+
},
54+
RegKind::Vector => dl.vector_align(self.size).abi,
55+
--
56+
2.47.0
57+

lang-rust/rustc/spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VER=1.81.0
1+
VER=1.82.0
22
SRCS="tbl::https://static.rust-lang.org/dist/rustc-${VER}-src.tar.xz"
3-
CHKSUMS="sha256::36217ef7e32f40a180e3d79bd666b4dfdaed49dd381023a5fb765fd12d0092ce"
3+
CHKSUMS="sha256::1276a0bb8fa12288ba6fa96597d28b40e74c44257c051d3bc02c2b049bb38210"
44
CHKUPDATE="anitya::id=7635"

0 commit comments

Comments
 (0)