rust: Upgrade 1.73.0 -> 1.74.0

Replace musl fixes with backports from upstream.

Add sysconfdir to config.toml to fix:

| thread 'main' panicked at install.rs:92:9:
| User doesn't have write access on `install.sysconfdir` path in `config.toml`.

https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html

(From OE-Core rev: 84f46dd2503bb0ef238fef0097c66fda88f6cbda)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alex Kiernan
2023-12-29 11:44:34 +00:00
committed by Richard Purdie
parent 537ed2b654
commit 8fd396bc3d
17 changed files with 725 additions and 326 deletions

View File

@@ -1,4 +1,4 @@
When building for the target, some build paths end up embedded in the binaries.
When building for the target, some build paths end up embedded in the binaries.
These changes remove that. Further investigation is needed to work out the way
to resolve these issues properly upstream.
@@ -6,19 +6,19 @@ Upstream-Status: Inappropriate [patches need rework]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Index: rustc-1.73.0-src/compiler/rustc_codegen_llvm/src/context.rs
===================================================================
--- rustc-1.73.0-src.orig/compiler/rustc_codegen_llvm/src/context.rs
+++ rustc-1.73.0-src/compiler/rustc_codegen_llvm/src/context.rs
@@ -157,46 +157,6 @@ pub unsafe fn create_module<'ll>(
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index b4b2ab1e1f8a..8bb3e3f0557c 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -158,46 +158,6 @@ pub unsafe fn create_module<'ll>(
}
}
- // Ensure the data-layout values hardcoded remain the defaults.
- if sess.target.is_builtin {
- // tm is disposed by its drop impl
- let tm = crate::back::write::create_informational_target_machine(tcx.sess);
- llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, tm);
- llvm::LLVMRustDisposeTargetMachine(tm);
- llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, &tm);
-
- let llvm_data_layout = llvm::LLVMGetDataLayoutStr(llmod);
- let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes())