diff options
author | 2025-02-22 13:53:33 -0500 | |
---|---|---|
committer | 2025-02-22 13:53:33 -0500 | |
commit | 2031eb7654464d43398f0d21d792bae9df83f3ba (patch) | |
tree | 37dbf76568ec7b256749b2a7e38a31913cba61a9 /dev-lang/rust/files | |
parent | cc2e0d6465c7a805a18be2f1c9e5a411304a89bc (diff) | |
download | ppo-master.tar.xz |
Diffstat (limited to 'dev-lang/rust/files')
-rw-r--r-- | dev-lang/rust/files/1.67.0-doc-wasm.patch | 34 | ||||
-rw-r--r-- | dev-lang/rust/files/1.85.0-cross-compile-libz.patch | 26 |
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-lang/rust/files/1.67.0-doc-wasm.patch b/dev-lang/rust/files/1.67.0-doc-wasm.patch new file mode 100644 index 0000000..06011de --- /dev/null +++ b/dev-lang/rust/files/1.67.0-doc-wasm.patch @@ -0,0 +1,34 @@ +From 92aa5f6b272bcdc020a34f8d90f9ef851b5b4504 Mon Sep 17 00:00:00 2001 +From: John Millikin <john@john-millikin.com> +Date: Mon, 9 Jan 2023 13:54:21 +0900 +Subject: [PATCH] Disable `linux_ext` in wasm32 and fortanix rustdoc builds. + +The `std::os::unix` module is stubbed out when building docs for these +target platforms. The introduction of Linux-specific extension traits +caused `std::os::net` to depend on sub-modules of `std::os::unix`, +which broke rustdoc for the `wasm32-unknown-unknown` target. + +Adding an additional `#[cfg]` guard solves that rustdoc failure by +not declaring `linux_ext` on targets with a stubbed `std::os::unix`. +--- + library/std/src/os/net/mod.rs | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/library/std/src/os/net/mod.rs b/library/std/src/os/net/mod.rs +index 5ec267c41e97c..b7046dd7c598c 100644 +--- a/library/std/src/os/net/mod.rs ++++ b/library/std/src/os/net/mod.rs +@@ -1,4 +1,13 @@ + //! OS-specific networking functionality. + ++// See cfg macros in `library/std/src/os/mod.rs` for why these platforms must ++// be special-cased during rustdoc generation. ++#[cfg(not(all( ++ doc, ++ any( ++ all(target_arch = "wasm32", not(target_os = "wasi")), ++ all(target_vendor = "fortanix", target_env = "sgx") ++ ) ++)))] + #[cfg(any(target_os = "linux", target_os = "android", doc))] + pub(super) mod linux_ext; diff --git a/dev-lang/rust/files/1.85.0-cross-compile-libz.patch b/dev-lang/rust/files/1.85.0-cross-compile-libz.patch new file mode 100644 index 0000000..7bd45c4 --- /dev/null +++ b/dev-lang/rust/files/1.85.0-cross-compile-libz.patch @@ -0,0 +1,26 @@ +From 768f7e50a6d9a3db4e4eef45dcb4c56e9b580389 Mon Sep 17 00:00:00 2001 +From: Matt Jolly <kangie@gentoo.org> +Date: Sun, 9 Feb 2025 21:12:43 +1000 +Subject: [PATCH] Update libz cross-compile patch for 9999 (1.86.0) + +See-also: https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22 +See-also: https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -219,13 +219,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"); +- +- // Don't link system libs if cross-compiling unless targeting Windows. +- // On Windows system DLLs aren't linked directly, instead import libraries are used. +- // These import libraries are independent of the host. +- if !is_crossed || target.contains("windows") { +- cmd.arg("--system-libs"); +- } ++ cmd.arg("--system-libs"); + + // We need libkstat for getHostCPUName on SPARC builds. + // See also: https://github.com/llvm/llvm-project/issues/64186 +-- +2.48.0 |