diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-10 11:34:01 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-10 11:34:01 +0000 |
commit | cc901a8ce7c6bfe97e3b4f048619693d360ae348 (patch) | |
tree | c250ff07a4d508fa08b487b616e0ae8aff2f0d8e /dev-lang/rust/files | |
parent | c9badf79e4669147edb94182af5776072f2ffaea (diff) |
gentoo auto-resync : 10:02:2024 - 11:34:00
Diffstat (limited to 'dev-lang/rust/files')
-rw-r--r-- | dev-lang/rust/files/1.74.1-cross-compile-libz.patch | 19 | ||||
-rw-r--r-- | dev-lang/rust/files/1.75.0-handle-vendored-sources.patch | 45 |
2 files changed, 64 insertions, 0 deletions
diff --git a/dev-lang/rust/files/1.74.1-cross-compile-libz.patch b/dev-lang/rust/files/1.74.1-cross-compile-libz.patch new file mode 100644 index 000000000000..f2a881b46134 --- /dev/null +++ b/dev-lang/rust/files/1.74.1-cross-compile-libz.patch @@ -0,0 +1,19 @@ +https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22 +https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497 + +diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs +index f606fa483ca..8a2e1c40e8b 100644 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -237,10 +237,7 @@ fn main() { + // of llvm-config, not the target that we're attempting to link. + let mut cmd = Command::new(&llvm_config); + cmd.arg(llvm_link_arg).arg("--libs"); +- +- if !is_crossed { +- cmd.arg("--system-libs"); +- } ++ cmd.arg("--system-libs"); + + if (target.starts_with("arm") && !target.contains("freebsd")) + || target.starts_with("mips-") diff --git a/dev-lang/rust/files/1.75.0-handle-vendored-sources.patch b/dev-lang/rust/files/1.75.0-handle-vendored-sources.patch new file mode 100644 index 000000000000..c68ceba15e82 --- /dev/null +++ b/dev-lang/rust/files/1.75.0-handle-vendored-sources.patch @@ -0,0 +1,45 @@ +From 4b7e0a0b56aa2446e670dfd6558380a1039a86aa Mon Sep 17 00:00:00 2001 +From: Arlo Siemsen <arsiem@microsoft.com> +Date: Thu, 4 Jan 2024 11:40:56 -0600 +Subject: [PATCH] Handle vendored sources when remapping paths + +Signed-off-by: Randy Barlow <randy@electronsweatshop.com> +--- + src/bootstrap/src/core/builder.rs | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index 4e20babc55a..3770d0687b2 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -1799,15 +1799,20 @@ pub fn cargo( + } + + if self.config.rust_remap_debuginfo { +- // FIXME: handle vendored sources +- let registry_src = t!(home::cargo_home()).join("registry").join("src"); + let mut env_var = OsString::new(); +- for entry in t!(std::fs::read_dir(registry_src)) { +- if !env_var.is_empty() { +- env_var.push("\t"); +- } +- env_var.push(t!(entry).path()); ++ if self.config.vendor { ++ let vendor = self.build.src.join("vendor"); ++ env_var.push(vendor); + env_var.push("=/rust/deps"); ++ } else { ++ let registry_src = t!(home::cargo_home()).join("registry").join("src"); ++ for entry in t!(std::fs::read_dir(registry_src)) { ++ if !env_var.is_empty() { ++ env_var.push("\t"); ++ } ++ env_var.push(t!(entry).path()); ++ env_var.push("=/rust/deps"); ++ } + } + cargo.env("RUSTC_CARGO_REGISTRY_SRC_TO_REMAP", env_var); + } +-- +2.43.0 + |