-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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
- Loading branch information
1 parent
654c69d
commit 5f9deb7
Showing
5 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
lang-rust/rustc/autobuild/patches/0003-Revert-Add-f16-f128-handling-in-a-couple-places.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
From 84386164e3c2c6ac5348040bb2b662310127134e Mon Sep 17 00:00:00 2001 | ||
From: Mingcong Bai <jeffbai@aosc.io> | ||
Date: Fri, 18 Oct 2024 14:51:44 +0800 | ||
Subject: [PATCH 3/3] Revert "Add f16/f128 handling in a couple places" | ||
|
||
The f16/f128 handling introduced as part of rust-lang/rustc#125016 (Update | ||
compiler_builtins to 0.1.114) broke compilation on LoongArch and RISC-V: | ||
|
||
error: internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs: | ||
126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) } | ||
|
||
thread 'rustc' panicked at compiler/rustc_codegen_llvm/src/abi.rs:126:22: | ||
Box<dyn Any> | ||
|
||
This should be resolved with LLVM 19, but we are still on LLVM 18. | ||
|
||
Revert 99e6a28804eac57faa37134d61a2bb17069996a2 as a temporary workaround. | ||
|
||
Ref: https://github.com/rust-lang/rust/pull/125016 | ||
--- | ||
compiler/rustc_codegen_llvm/src/abi.rs | 2 -- | ||
compiler/rustc_target/src/abi/call/mod.rs | 2 -- | ||
2 files changed, 4 deletions(-) | ||
|
||
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs | ||
index dea574a53c..6d1bfb42e4 100644 | ||
--- a/compiler/rustc_codegen_llvm/src/abi.rs | ||
+++ b/compiler/rustc_codegen_llvm/src/abi.rs | ||
@@ -120,10 +120,8 @@ impl LlvmType for Reg { | ||
match self.kind { | ||
RegKind::Integer => cx.type_ix(self.size.bits()), | ||
RegKind::Float => match self.size.bits() { | ||
- 16 => cx.type_f16(), | ||
32 => cx.type_f32(), | ||
64 => cx.type_f64(), | ||
- 128 => cx.type_f128(), | ||
_ => bug!("unsupported float: {:?}", self), | ||
}, | ||
RegKind::Vector => cx.type_vector(cx.type_i8(), self.size.bytes()), | ||
diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs | ||
index 082c169b21..78a8de9813 100644 | ||
--- a/compiler/rustc_target/src/abi/call/mod.rs | ||
+++ b/compiler/rustc_target/src/abi/call/mod.rs | ||
@@ -238,10 +238,8 @@ impl Reg { | ||
_ => panic!("unsupported integer: {self:?}"), | ||
}, | ||
RegKind::Float => match self.size.bits() { | ||
- 16 => dl.f16_align.abi, | ||
32 => dl.f32_align.abi, | ||
64 => dl.f64_align.abi, | ||
- 128 => dl.f128_align.abi, | ||
_ => panic!("unsupported float: {self:?}"), | ||
}, | ||
RegKind::Vector => dl.vector_align(self.size).abi, | ||
-- | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VER=1.81.0 | ||
VER=1.82.0 | ||
SRCS="tbl::https://static.rust-lang.org/dist/rustc-${VER}-src.tar.xz" | ||
CHKSUMS="sha256::36217ef7e32f40a180e3d79bd666b4dfdaed49dd381023a5fb765fd12d0092ce" | ||
CHKSUMS="sha256::1276a0bb8fa12288ba6fa96597d28b40e74c44257c051d3bc02c2b049bb38210" | ||
CHKUPDATE="anitya::id=7635" |