public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-05-31  5:53 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2f5f9d1a670ddbfb09193750b7d6fefa24bfd2f4
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=2f5f9d1a

Initial commit with README

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 README.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..9999e72
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,24 @@
+###################
+Gentoo Rust Patches
+###################
+
+This repository contains patches required to build Rust on Gentoo Linux. These patches were previously
+part of the main Gentoo repository but have been moved here due to their size and to make maintenance easier.
+
+The patches are applied to the Rust source code during the build process. They address various issues such as
+compatibility with the Gentoo environment, specific compiler flags, and other adjustments needed for a successful build,
+or are backports to fix specific issues.
+
+Usage
+=====
+
+A branch will be created for each new Rust release (e.g. ``1.88``), and patches will be added to that branch as needed.
+
+Tags for ``${PV}`` will be created for each release, e.g. ``1.88.0``, ``1.88.1``, etc., to track the specific versions of
+Rust that these patches apply to. Revbumps will be tagged as required - if a patch is added or updated, a tag will be
+created for the new version (e.g. ``1.88.0-r1``).
+
+``master`` will contain patches required for ``nightly`` (live / ``9999``) ebuilds and will be updated as needed.
+
+To use the patches, you can clone this repository and apply the patches to the Rust source code before building
+(or use the Gentoo ebuild system which will handle this automatically!).


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-05-31  5:53 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     3ebc82c1715a2d64d375622e2043183e9762706e
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:12 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=3ebc82c1

Add patches for Rust 1.74.1-r101

Patches:
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.62.1-musl-dynamic-linking.patch
- 1.67.0-doc-wasm.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.62.1-musl-dynamic-linking.patch                  | 25 ++++++++++++++++
 1.67.0-doc-wasm.patch                              | 34 ++++++++++++++++++++++
 ....0-ignore-broken-and-non-applicable-tests.patch | 30 +++++++++++++++++++
 1.74.1-cross-compile-libz.patch                    | 19 ++++++++++++
 4 files changed, 108 insertions(+)

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.62.1-musl-dynamic-linking.patch
new file mode 100644
index 0000000..fd56396
--- /dev/null
+++ b/1.62.1-musl-dynamic-linking.patch
@@ -0,0 +1,25 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
+index 207a87ab0..8a5a43363 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+ 
+     // These targets statically link libc by default
+-    base.crt_static_default = true;
++    base.crt_static_default = false;
+ 
+     base
+ }
+-- 
+2.35.1

diff --git a/1.67.0-doc-wasm.patch b/1.67.0-doc-wasm.patch
new file mode 100644
index 0000000..06011de
--- /dev/null
+++ b/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/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.70.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 0000000..2e12c78
--- /dev/null
+++ b/1.70.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,30 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] Ignore broken and non-applicable tests
+
+c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ test/ui/env-funky-keys.rs                                   | 1 +
+ 6 files changed, 10 insertions(+)
+
+diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
+index c5c824ac58d..f3fe047a79c 100644
+--- a/tests/ui/env-funky-keys.rs
++++ b/tests/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+ 
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+-- 
+2.24.1
+

diff --git a/1.74.1-cross-compile-libz.patch b/1.74.1-cross-compile-libz.patch
new file mode 100644
index 0000000..f2a881b
--- /dev/null
+++ b/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-")


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
@ 2025-05-31  5:53 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     73bc0ce13ed4d6de07a7e7df40eaf7697b36fb21
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:12 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=73bc0ce1

Add patches for Rust 1.77.1-r101

Patches:
- 1.75.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch | 45 ------------------------------------
 1 file changed, 45 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
deleted file mode 100644
index c68ceba..0000000
--- a/1.75.0-handle-vendored-sources.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-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
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
@ 2025-05-31  5:53 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2d31cbadea45c8c5135e30f6eda46e17cf4ca4ef
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:12 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=2d31cbad

Add patches for Rust 1.75.0-r101

Patches:
- 1.75.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.75.0-handle-vendored-sources.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch               | 45 ++++++++++++++++++++++
 ...king.patch => 1.75.0-musl-dynamic-linking.patch | 10 +----
 2 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
new file mode 100644
index 0000000..c68ceba
--- /dev/null
+++ b/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
+

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.75.0-musl-dynamic-linking.patch
similarity index 58%
rename from 1.62.1-musl-dynamic-linking.patch
rename to 1.75.0-musl-dynamic-linking.patch
index fd56396..7dc34f8 100644
--- a/1.62.1-musl-dynamic-linking.patch
+++ b/1.75.0-musl-dynamic-linking.patch
@@ -4,14 +4,8 @@ Date: Tue, 2 Aug 2022 18:32:53 -0500
 Subject: [PATCH] Enable dynamic linking by default for musl
 
 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab0..8a5a43363 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
      base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
  


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
@ 2025-05-31  5:53 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     12206197aa0c2efbdf31c0d156fe043491450df8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:12 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=12206197

Add patches for Rust 1.76.0-r101

Patches:
- 1.75.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.75.0-handle-vendored-sources.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
new file mode 100644
index 0000000..02bfeca
--- /dev/null
+++ b/1.76.0-loong-code-model.patch
@@ -0,0 +1,73 @@
+https://github.com/rust-lang/rust/pull/120661
+From: WANG Xuerui <xen0n@gentoo.org>
+Date: Mon, 5 Feb 2024 13:18:32 +0800
+Subject: [PATCH] target: default to the medium code model on LoongArch targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Rust LoongArch targets have been using the default LLVM code model
+so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
+As described in the "Code Model" section of LoongArch ELF psABI spec
+v20231219 [1], one can only make function calls as far as ±128MiB with
+the "normal" code model; this is insufficient for very large software
+containing Rust components that needs to be linked into the big text
+section, such as Chromium.
+
+Because:
+
+* we do not want to ask users to recompile std if they are to build
+  such software,
+* objects compiled with larger code models can be linked with those
+  with smaller code models without problems, and
+* the "medium" code model is comparable to the "small"/"normal" one
+  performance-wise (same data access pattern; each function call
+  becomes 2-insn long and indirect, but this may be relaxed back into
+  the direct 1-insn form in a future LLVM version), but is able to
+  perform function calls within ±128GiB,
+
+it is better to just switch the targets to the "medium" code model,
+which is also "medium" in LLVM-speak.
+
+[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
+@@ -1,4 +1,4 @@
+-use crate::spec::{base, Target, TargetOptions};
++use crate::spec::{base, CodeModel, Target, TargetOptions};
+ 
+ pub fn target() -> Target {
+     Target {
+@@ -7,6 +7,7 @@ pub fn target() -> Target {
+         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
+         arch: "loongarch64".into(),
+         options: TargetOptions {
++            code_model: Some(CodeModel::Medium),
+             cpu: "generic".into(),
+             features: "+f,+d".into(),
+             llvm_abiname: "lp64d".into(),
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
+@@ -16,7 +16,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
+@@ -17,7 +17,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+-- 
+2.43.0
+


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
@ 2025-05-31  5:53 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     9b8d2c520061141f10d77c1f19d2185fd165b077
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:12 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9b8d2c52

Add patches for Rust 1.78.0-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.78.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch                      | 73 ----------------------
 ....0-ignore-broken-and-non-applicable-tests.patch | 12 ++--
 ...king.patch => 1.78.0-musl-dynamic-linking.patch |  2 +-
 1.79.0-revert-8c40426.patch                        | 18 ++++++
 4 files changed, 25 insertions(+), 80 deletions(-)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
deleted file mode 100644
index 02bfeca..0000000
--- a/1.76.0-loong-code-model.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://github.com/rust-lang/rust/pull/120661
-From: WANG Xuerui <xen0n@gentoo.org>
-Date: Mon, 5 Feb 2024 13:18:32 +0800
-Subject: [PATCH] target: default to the medium code model on LoongArch targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The Rust LoongArch targets have been using the default LLVM code model
-so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
-As described in the "Code Model" section of LoongArch ELF psABI spec
-v20231219 [1], one can only make function calls as far as ±128MiB with
-the "normal" code model; this is insufficient for very large software
-containing Rust components that needs to be linked into the big text
-section, such as Chromium.
-
-Because:
-
-* we do not want to ask users to recompile std if they are to build
-  such software,
-* objects compiled with larger code models can be linked with those
-  with smaller code models without problems, and
-* the "medium" code model is comparable to the "small"/"normal" one
-  performance-wise (same data access pattern; each function call
-  becomes 2-insn long and indirect, but this may be relaxed back into
-  the direct 1-insn form in a future LLVM version), but is able to
-  perform function calls within ±128GiB,
-
-it is better to just switch the targets to the "medium" code model,
-which is also "medium" in LLVM-speak.
-
-[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-@@ -1,4 +1,4 @@
--use crate::spec::{base, Target, TargetOptions};
-+use crate::spec::{base, CodeModel, Target, TargetOptions};
- 
- pub fn target() -> Target {
-     Target {
-@@ -7,6 +7,7 @@ pub fn target() -> Target {
-         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
-         arch: "loongarch64".into(),
-         options: TargetOptions {
-+            code_model: Some(CodeModel::Medium),
-             cpu: "generic".into(),
-             features: "+f,+d".into(),
-             llvm_abiname: "lp64d".into(),
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-@@ -16,7 +16,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-@@ -17,7 +17,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
--- 
-2.43.0
-

diff --git a/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
similarity index 84%
rename from 1.70.0-ignore-broken-and-non-applicable-tests.patch
rename to 1.78.0-ignore-broken-and-non-applicable-tests.patch
index 2e12c78..610e5d0 100644
--- a/1.70.0-ignore-broken-and-non-applicable-tests.patch
+++ b/1.78.0-ignore-broken-and-non-applicable-tests.patch
@@ -18,13 +18,13 @@ index c5c824ac58d..f3fe047a79c 100644
 --- a/tests/ui/env-funky-keys.rs
 +++ b/tests/ui/env-funky-keys.rs
 @@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
+ //@ run-pass
+ //@ Ignore this test on Android, because it segfaults there.
  
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-cloudabi no execve
 -- 
 2.24.1
 

diff --git a/1.75.0-musl-dynamic-linking.patch b/1.78.0-musl-dynamic-linking.patch
similarity index 88%
rename from 1.75.0-musl-dynamic-linking.patch
rename to 1.78.0-musl-dynamic-linking.patch
index 7dc34f8..25a281c 100644
--- a/1.75.0-musl-dynamic-linking.patch
+++ b/1.78.0-musl-dynamic-linking.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jory Pratt <anarchy@gentoo.org>
 --- a/compiler/rustc_target/src/spec/base/linux_musl.rs
 +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
-     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+     base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
  
      // These targets statically link libc by default
 -    base.crt_static_default = true;

diff --git a/1.79.0-revert-8c40426.patch b/1.79.0-revert-8c40426.patch
new file mode 100644
index 0000000..583f400
--- /dev/null
+++ b/1.79.0-revert-8c40426.patch
@@ -0,0 +1,18 @@
+This reverts commit 8c40426051a667673cdac9975f84cb6acd4e245f.
+
+https://bugs.gentoo.org/933382
+
+diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
+index d4473e24039..58f351d17fa 100644
+--- a/src/bootstrap/src/core/build_steps/llvm.rs
++++ b/src/bootstrap/src/core/build_steps/llvm.rs
+@@ -724,8 +724,7 @@ fn configure_cmake(
+             }
+         }
+         cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
+-            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
+-            .define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
++            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx));
+     }
+ 
+     cfg.build_arg("-j").build_arg(builder.jobs().to_string());


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
@ 2025-05-31  5:53 Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b078238c75c968c63a6dadd08180e0256154d2af
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:52:12 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:52:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=b078238c

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
@ 2025-05-31  5:55 Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly
                   ` (11 more replies)
  0 siblings, 12 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     d96bdc64ed36ccdd4c5456f096b1a501e72ea056
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:45 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=d96bdc64

Initial commit with README

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 README.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..9999e72
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,24 @@
+###################
+Gentoo Rust Patches
+###################
+
+This repository contains patches required to build Rust on Gentoo Linux. These patches were previously
+part of the main Gentoo repository but have been moved here due to their size and to make maintenance easier.
+
+The patches are applied to the Rust source code during the build process. They address various issues such as
+compatibility with the Gentoo environment, specific compiler flags, and other adjustments needed for a successful build,
+or are backports to fix specific issues.
+
+Usage
+=====
+
+A branch will be created for each new Rust release (e.g. ``1.88``), and patches will be added to that branch as needed.
+
+Tags for ``${PV}`` will be created for each release, e.g. ``1.88.0``, ``1.88.1``, etc., to track the specific versions of
+Rust that these patches apply to. Revbumps will be tagged as required - if a patch is added or updated, a tag will be
+created for the new version (e.g. ``1.88.0-r1``).
+
+``master`` will contain patches required for ``nightly`` (live / ``9999``) ebuilds and will be updated as needed.
+
+To use the patches, you can clone this repository and apply the patches to the Rust source code before building
+(or use the Gentoo ebuild system which will handle this automatically!).


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     75008d1d32a37a21972022ff6b10e5fc9baea5df
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:45 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=75008d1d

Add patches for Rust 1.77.1-r101

Patches:
- 1.75.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch | 45 ------------------------------------
 1 file changed, 45 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
deleted file mode 100644
index c68ceba..0000000
--- a/1.75.0-handle-vendored-sources.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-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
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     3fe90bc52d2ab9c275e959e07b7009237b3cf83c
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:45 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=3fe90bc5

Add patches for Rust 1.78.0-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.78.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch                      | 73 ----------------------
 ....0-ignore-broken-and-non-applicable-tests.patch | 12 ++--
 ...king.patch => 1.78.0-musl-dynamic-linking.patch |  2 +-
 1.79.0-revert-8c40426.patch                        | 18 ++++++
 4 files changed, 25 insertions(+), 80 deletions(-)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
deleted file mode 100644
index 02bfeca..0000000
--- a/1.76.0-loong-code-model.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://github.com/rust-lang/rust/pull/120661
-From: WANG Xuerui <xen0n@gentoo.org>
-Date: Mon, 5 Feb 2024 13:18:32 +0800
-Subject: [PATCH] target: default to the medium code model on LoongArch targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The Rust LoongArch targets have been using the default LLVM code model
-so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
-As described in the "Code Model" section of LoongArch ELF psABI spec
-v20231219 [1], one can only make function calls as far as ±128MiB with
-the "normal" code model; this is insufficient for very large software
-containing Rust components that needs to be linked into the big text
-section, such as Chromium.
-
-Because:
-
-* we do not want to ask users to recompile std if they are to build
-  such software,
-* objects compiled with larger code models can be linked with those
-  with smaller code models without problems, and
-* the "medium" code model is comparable to the "small"/"normal" one
-  performance-wise (same data access pattern; each function call
-  becomes 2-insn long and indirect, but this may be relaxed back into
-  the direct 1-insn form in a future LLVM version), but is able to
-  perform function calls within ±128GiB,
-
-it is better to just switch the targets to the "medium" code model,
-which is also "medium" in LLVM-speak.
-
-[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-@@ -1,4 +1,4 @@
--use crate::spec::{base, Target, TargetOptions};
-+use crate::spec::{base, CodeModel, Target, TargetOptions};
- 
- pub fn target() -> Target {
-     Target {
-@@ -7,6 +7,7 @@ pub fn target() -> Target {
-         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
-         arch: "loongarch64".into(),
-         options: TargetOptions {
-+            code_model: Some(CodeModel::Medium),
-             cpu: "generic".into(),
-             features: "+f,+d".into(),
-             llvm_abiname: "lp64d".into(),
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-@@ -16,7 +16,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-@@ -17,7 +17,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
--- 
-2.43.0
-

diff --git a/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
similarity index 84%
rename from 1.70.0-ignore-broken-and-non-applicable-tests.patch
rename to 1.78.0-ignore-broken-and-non-applicable-tests.patch
index 2e12c78..610e5d0 100644
--- a/1.70.0-ignore-broken-and-non-applicable-tests.patch
+++ b/1.78.0-ignore-broken-and-non-applicable-tests.patch
@@ -18,13 +18,13 @@ index c5c824ac58d..f3fe047a79c 100644
 --- a/tests/ui/env-funky-keys.rs
 +++ b/tests/ui/env-funky-keys.rs
 @@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
+ //@ run-pass
+ //@ Ignore this test on Android, because it segfaults there.
  
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-cloudabi no execve
 -- 
 2.24.1
 

diff --git a/1.75.0-musl-dynamic-linking.patch b/1.78.0-musl-dynamic-linking.patch
similarity index 88%
rename from 1.75.0-musl-dynamic-linking.patch
rename to 1.78.0-musl-dynamic-linking.patch
index 7dc34f8..25a281c 100644
--- a/1.75.0-musl-dynamic-linking.patch
+++ b/1.78.0-musl-dynamic-linking.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jory Pratt <anarchy@gentoo.org>
 --- a/compiler/rustc_target/src/spec/base/linux_musl.rs
 +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
-     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+     base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
  
      // These targets statically link libc by default
 -    base.crt_static_default = true;

diff --git a/1.79.0-revert-8c40426.patch b/1.79.0-revert-8c40426.patch
new file mode 100644
index 0000000..583f400
--- /dev/null
+++ b/1.79.0-revert-8c40426.patch
@@ -0,0 +1,18 @@
+This reverts commit 8c40426051a667673cdac9975f84cb6acd4e245f.
+
+https://bugs.gentoo.org/933382
+
+diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
+index d4473e24039..58f351d17fa 100644
+--- a/src/bootstrap/src/core/build_steps/llvm.rs
++++ b/src/bootstrap/src/core/build_steps/llvm.rs
+@@ -724,8 +724,7 @@ fn configure_cmake(
+             }
+         }
+         cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
+-            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
+-            .define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
++            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx));
+     }
+ 
+     cfg.build_arg("-j").build_arg(builder.jobs().to_string());


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     4eda1bb30489ddb6bdfefd77d7301de73f8fb3f5
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:45 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=4eda1bb3

Add patches for Rust 1.76.0-r101

Patches:
- 1.75.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.75.0-handle-vendored-sources.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
new file mode 100644
index 0000000..02bfeca
--- /dev/null
+++ b/1.76.0-loong-code-model.patch
@@ -0,0 +1,73 @@
+https://github.com/rust-lang/rust/pull/120661
+From: WANG Xuerui <xen0n@gentoo.org>
+Date: Mon, 5 Feb 2024 13:18:32 +0800
+Subject: [PATCH] target: default to the medium code model on LoongArch targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Rust LoongArch targets have been using the default LLVM code model
+so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
+As described in the "Code Model" section of LoongArch ELF psABI spec
+v20231219 [1], one can only make function calls as far as ±128MiB with
+the "normal" code model; this is insufficient for very large software
+containing Rust components that needs to be linked into the big text
+section, such as Chromium.
+
+Because:
+
+* we do not want to ask users to recompile std if they are to build
+  such software,
+* objects compiled with larger code models can be linked with those
+  with smaller code models without problems, and
+* the "medium" code model is comparable to the "small"/"normal" one
+  performance-wise (same data access pattern; each function call
+  becomes 2-insn long and indirect, but this may be relaxed back into
+  the direct 1-insn form in a future LLVM version), but is able to
+  perform function calls within ±128GiB,
+
+it is better to just switch the targets to the "medium" code model,
+which is also "medium" in LLVM-speak.
+
+[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
+@@ -1,4 +1,4 @@
+-use crate::spec::{base, Target, TargetOptions};
++use crate::spec::{base, CodeModel, Target, TargetOptions};
+ 
+ pub fn target() -> Target {
+     Target {
+@@ -7,6 +7,7 @@ pub fn target() -> Target {
+         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
+         arch: "loongarch64".into(),
+         options: TargetOptions {
++            code_model: Some(CodeModel::Medium),
+             cpu: "generic".into(),
+             features: "+f,+d".into(),
+             llvm_abiname: "lp64d".into(),
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
+@@ -16,7 +16,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
+@@ -17,7 +17,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+-- 
+2.43.0
+


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     147f26c2487eec11e297eb25efd4623c366a597b
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:45 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=147f26c2

Add patches for Rust 1.74.1-r101

Patches:
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.62.1-musl-dynamic-linking.patch
- 1.67.0-doc-wasm.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.62.1-musl-dynamic-linking.patch                  | 25 ++++++++++++++++
 1.67.0-doc-wasm.patch                              | 34 ++++++++++++++++++++++
 ....0-ignore-broken-and-non-applicable-tests.patch | 30 +++++++++++++++++++
 1.74.1-cross-compile-libz.patch                    | 19 ++++++++++++
 4 files changed, 108 insertions(+)

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.62.1-musl-dynamic-linking.patch
new file mode 100644
index 0000000..fd56396
--- /dev/null
+++ b/1.62.1-musl-dynamic-linking.patch
@@ -0,0 +1,25 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
+index 207a87ab0..8a5a43363 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+ 
+     // These targets statically link libc by default
+-    base.crt_static_default = true;
++    base.crt_static_default = false;
+ 
+     base
+ }
+-- 
+2.35.1

diff --git a/1.67.0-doc-wasm.patch b/1.67.0-doc-wasm.patch
new file mode 100644
index 0000000..06011de
--- /dev/null
+++ b/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/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.70.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 0000000..2e12c78
--- /dev/null
+++ b/1.70.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,30 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] Ignore broken and non-applicable tests
+
+c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ test/ui/env-funky-keys.rs                                   | 1 +
+ 6 files changed, 10 insertions(+)
+
+diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
+index c5c824ac58d..f3fe047a79c 100644
+--- a/tests/ui/env-funky-keys.rs
++++ b/tests/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+ 
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+-- 
+2.24.1
+

diff --git a/1.74.1-cross-compile-libz.patch b/1.74.1-cross-compile-libz.patch
new file mode 100644
index 0000000..f2a881b
--- /dev/null
+++ b/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-")


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     88334212dc1ebbfd9bfce3e163984c23292e582e
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:45 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=88334212

Add patches for Rust 1.75.0-r101

Patches:
- 1.75.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.67.0-doc-wasm.patch
- 1.75.0-handle-vendored-sources.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch               | 45 ++++++++++++++++++++++
 ...king.patch => 1.75.0-musl-dynamic-linking.patch | 10 +----
 2 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
new file mode 100644
index 0000000..c68ceba
--- /dev/null
+++ b/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
+

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.75.0-musl-dynamic-linking.patch
similarity index 58%
rename from 1.62.1-musl-dynamic-linking.patch
rename to 1.75.0-musl-dynamic-linking.patch
index fd56396..7dc34f8 100644
--- a/1.62.1-musl-dynamic-linking.patch
+++ b/1.75.0-musl-dynamic-linking.patch
@@ -4,14 +4,8 @@ Date: Tue, 2 Aug 2022 18:32:53 -0500
 Subject: [PATCH] Enable dynamic linking by default for musl
 
 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab0..8a5a43363 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
      base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
  


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.81 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.82 " Matt Jolly
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.82 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.83 " Matt Jolly
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.83 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.82 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.84 " Matt Jolly
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.84 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (2 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.83 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.85 " Matt Jolly
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.85 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (3 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.84 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.86 " Matt Jolly
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.86 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (4 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.85 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.87 " Matt Jolly
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.87 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (5 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.86 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.88 " Matt Jolly
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.88 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (6 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.87 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:master " Matt Jolly
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:master commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (7 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.88 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80.1-r101 " Matt Jolly
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80.1-r101 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (8 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:master " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81.0-r101 " Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 " Matt Jolly
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.81.0-r101 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (9 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80.1-r101 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 " Matt Jolly
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 commit in: /
  2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
                   ` (10 preceding siblings ...)
  2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81.0-r101 " Matt Jolly
@ 2025-05-31  5:55 ` Matt Jolly
  11 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-05-31  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0b8017561e9ae49ae7057fe75b0f8b579d8ca8
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 05:54:46 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sat May 31 05:54:46 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=9c0b8017

Add patches for Rust 1.80.1-r101

Patches:
- 1.78.0-musl-dynamic-linking.patch
- 1.74.1-cross-compile-libz.patch
- 1.67.0-doc-wasm.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-06-02  9:25 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     7cf432eff81656ac286c1ff3e4d549f35c22c784
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:16 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:16 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=7cf432ef

Initial commit with README

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 README.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..9999e72
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,24 @@
+###################
+Gentoo Rust Patches
+###################
+
+This repository contains patches required to build Rust on Gentoo Linux. These patches were previously
+part of the main Gentoo repository but have been moved here due to their size and to make maintenance easier.
+
+The patches are applied to the Rust source code during the build process. They address various issues such as
+compatibility with the Gentoo environment, specific compiler flags, and other adjustments needed for a successful build,
+or are backports to fix specific issues.
+
+Usage
+=====
+
+A branch will be created for each new Rust release (e.g. ``1.88``), and patches will be added to that branch as needed.
+
+Tags for ``${PV}`` will be created for each release, e.g. ``1.88.0``, ``1.88.1``, etc., to track the specific versions of
+Rust that these patches apply to. Revbumps will be tagged as required - if a patch is added or updated, a tag will be
+created for the new version (e.g. ``1.88.0-r1``).
+
+``master`` will contain patches required for ``nightly`` (live / ``9999``) ebuilds and will be updated as needed.
+
+To use the patches, you can clone this repository and apply the patches to the Rust source code before building
+(or use the Gentoo ebuild system which will handle this automatically!).


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-06-02  9:25 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     b3d182e7b831e65530c51d81bf21ac654c5dd81d
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:16 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:16 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=b3d182e7

Add patches for Rust 1.74.1-r101

Patches:
- 1.62.1-musl-dynamic-linking.patch
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.62.1-musl-dynamic-linking.patch                  | 19 +++++++++++++++
 1.67.0-doc-wasm.patch                              | 28 ++++++++++++++++++++++
 ....0-ignore-broken-and-non-applicable-tests.patch | 24 +++++++++++++++++++
 1.74.1-cross-compile-libz.patch                    | 17 +++++++++++++
 4 files changed, 88 insertions(+)

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.62.1-musl-dynamic-linking.patch
new file mode 100644
index 0000000..b64775c
--- /dev/null
+++ b/1.62.1-musl-dynamic-linking.patch
@@ -0,0 +1,19 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+ 
+     // These targets statically link libc by default
+-    base.crt_static_default = true;
++    base.crt_static_default = false;
+ 
+     base
+ }
+-- 
+2.35.1

diff --git a/1.67.0-doc-wasm.patch b/1.67.0-doc-wasm.patch
new file mode 100644
index 0000000..30cb8b9
--- /dev/null
+++ b/1.67.0-doc-wasm.patch
@@ -0,0 +1,28 @@
+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`.
+--- 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/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.70.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 0000000..590f960
--- /dev/null
+++ b/1.70.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,24 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] Ignore broken and non-applicable tests
+
+c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+--- a/tests/ui/env-funky-keys.rs
++++ b/tests/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+ 
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+-- 
+2.24.1
+

diff --git a/1.74.1-cross-compile-libz.patch b/1.74.1-cross-compile-libz.patch
new file mode 100644
index 0000000..98cec09
--- /dev/null
+++ b/1.74.1-cross-compile-libz.patch
@@ -0,0 +1,17 @@
+https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22
+https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497
+
+--- 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-")


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
@ 2025-06-02  9:25 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     e6afd1fe4bd15d46f748745ba16c6206b14a62c6
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:16 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:16 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=e6afd1fe

Add patches for Rust 1.76.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.75.0-handle-vendored-sources.patch
- 1.75.0-musl-dynamic-linking.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
new file mode 100644
index 0000000..02bfeca
--- /dev/null
+++ b/1.76.0-loong-code-model.patch
@@ -0,0 +1,73 @@
+https://github.com/rust-lang/rust/pull/120661
+From: WANG Xuerui <xen0n@gentoo.org>
+Date: Mon, 5 Feb 2024 13:18:32 +0800
+Subject: [PATCH] target: default to the medium code model on LoongArch targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Rust LoongArch targets have been using the default LLVM code model
+so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
+As described in the "Code Model" section of LoongArch ELF psABI spec
+v20231219 [1], one can only make function calls as far as ±128MiB with
+the "normal" code model; this is insufficient for very large software
+containing Rust components that needs to be linked into the big text
+section, such as Chromium.
+
+Because:
+
+* we do not want to ask users to recompile std if they are to build
+  such software,
+* objects compiled with larger code models can be linked with those
+  with smaller code models without problems, and
+* the "medium" code model is comparable to the "small"/"normal" one
+  performance-wise (same data access pattern; each function call
+  becomes 2-insn long and indirect, but this may be relaxed back into
+  the direct 1-insn form in a future LLVM version), but is able to
+  perform function calls within ±128GiB,
+
+it is better to just switch the targets to the "medium" code model,
+which is also "medium" in LLVM-speak.
+
+[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
+@@ -1,4 +1,4 @@
+-use crate::spec::{base, Target, TargetOptions};
++use crate::spec::{base, CodeModel, Target, TargetOptions};
+ 
+ pub fn target() -> Target {
+     Target {
+@@ -7,6 +7,7 @@ pub fn target() -> Target {
+         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
+         arch: "loongarch64".into(),
+         options: TargetOptions {
++            code_model: Some(CodeModel::Medium),
+             cpu: "generic".into(),
+             features: "+f,+d".into(),
+             llvm_abiname: "lp64d".into(),
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
+@@ -16,7 +16,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
+@@ -17,7 +17,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+-- 
+2.43.0
+


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
@ 2025-06-02  9:25 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     4b1ef8d3cb7847ac65739560591d9cd26af33e86
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:16 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:16 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=4b1ef8d3

Add patches for Rust 1.77.1-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.75.0-musl-dynamic-linking.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch | 39 ------------------------------------
 1 file changed, 39 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
deleted file mode 100644
index 5d39022..0000000
--- a/1.75.0-handle-vendored-sources.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-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>
---- 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
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
@ 2025-06-02  9:25 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f07a431a8b9d053d536b71a137f85621583d131b
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:16 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:16 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=f07a431a

Add patches for Rust 1.75.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.75.0-handle-vendored-sources.patch
- 1.75.0-musl-dynamic-linking.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch               | 39 ++++++++++++++++++++++
 ...king.patch => 1.75.0-musl-dynamic-linking.patch |  4 +--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
new file mode 100644
index 0000000..5d39022
--- /dev/null
+++ b/1.75.0-handle-vendored-sources.patch
@@ -0,0 +1,39 @@
+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>
+--- 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
+

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.75.0-musl-dynamic-linking.patch
similarity index 82%
rename from 1.62.1-musl-dynamic-linking.patch
rename to 1.75.0-musl-dynamic-linking.patch
index b64775c..7dc34f8 100644
--- a/1.62.1-musl-dynamic-linking.patch
+++ b/1.75.0-musl-dynamic-linking.patch
@@ -4,8 +4,8 @@ Date: Tue, 2 Aug 2022 18:32:53 -0500
 Subject: [PATCH] Enable dynamic linking by default for musl
 
 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
      base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
  


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
@ 2025-06-02  9:25 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     54b996aa8002f62ad89732c53055d95331380b3a
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:17 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:17 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=54b996aa

Add patches for Rust 1.78.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.74.1-cross-compile-libz.patch
- 1.78.0-ignore-broken-and-non-applicable-tests.patch
- 1.78.0-musl-dynamic-linking.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch                      | 73 ----------------------
 ....0-ignore-broken-and-non-applicable-tests.patch | 12 ++--
 ...king.patch => 1.78.0-musl-dynamic-linking.patch |  2 +-
 1.79.0-revert-8c40426.patch                        | 16 +++++
 4 files changed, 23 insertions(+), 80 deletions(-)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
deleted file mode 100644
index 02bfeca..0000000
--- a/1.76.0-loong-code-model.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://github.com/rust-lang/rust/pull/120661
-From: WANG Xuerui <xen0n@gentoo.org>
-Date: Mon, 5 Feb 2024 13:18:32 +0800
-Subject: [PATCH] target: default to the medium code model on LoongArch targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The Rust LoongArch targets have been using the default LLVM code model
-so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
-As described in the "Code Model" section of LoongArch ELF psABI spec
-v20231219 [1], one can only make function calls as far as ±128MiB with
-the "normal" code model; this is insufficient for very large software
-containing Rust components that needs to be linked into the big text
-section, such as Chromium.
-
-Because:
-
-* we do not want to ask users to recompile std if they are to build
-  such software,
-* objects compiled with larger code models can be linked with those
-  with smaller code models without problems, and
-* the "medium" code model is comparable to the "small"/"normal" one
-  performance-wise (same data access pattern; each function call
-  becomes 2-insn long and indirect, but this may be relaxed back into
-  the direct 1-insn form in a future LLVM version), but is able to
-  perform function calls within ±128GiB,
-
-it is better to just switch the targets to the "medium" code model,
-which is also "medium" in LLVM-speak.
-
-[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-@@ -1,4 +1,4 @@
--use crate::spec::{base, Target, TargetOptions};
-+use crate::spec::{base, CodeModel, Target, TargetOptions};
- 
- pub fn target() -> Target {
-     Target {
-@@ -7,6 +7,7 @@ pub fn target() -> Target {
-         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
-         arch: "loongarch64".into(),
-         options: TargetOptions {
-+            code_model: Some(CodeModel::Medium),
-             cpu: "generic".into(),
-             features: "+f,+d".into(),
-             llvm_abiname: "lp64d".into(),
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-@@ -16,7 +16,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-@@ -17,7 +17,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
--- 
-2.43.0
-

diff --git a/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
similarity index 80%
rename from 1.70.0-ignore-broken-and-non-applicable-tests.patch
rename to 1.78.0-ignore-broken-and-non-applicable-tests.patch
index 590f960..742c81a 100644
--- a/1.70.0-ignore-broken-and-non-applicable-tests.patch
+++ b/1.78.0-ignore-broken-and-non-applicable-tests.patch
@@ -12,13 +12,13 @@ sysroot-crates-are-unstable: can't run rustc without RPATH
 --- a/tests/ui/env-funky-keys.rs
 +++ b/tests/ui/env-funky-keys.rs
 @@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
+ //@ run-pass
+ //@ Ignore this test on Android, because it segfaults there.
  
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-cloudabi no execve
 -- 
 2.24.1
 

diff --git a/1.75.0-musl-dynamic-linking.patch b/1.78.0-musl-dynamic-linking.patch
similarity index 88%
rename from 1.75.0-musl-dynamic-linking.patch
rename to 1.78.0-musl-dynamic-linking.patch
index 7dc34f8..25a281c 100644
--- a/1.75.0-musl-dynamic-linking.patch
+++ b/1.78.0-musl-dynamic-linking.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jory Pratt <anarchy@gentoo.org>
 --- a/compiler/rustc_target/src/spec/base/linux_musl.rs
 +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
-     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+     base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
  
      // These targets statically link libc by default
 -    base.crt_static_default = true;

diff --git a/1.79.0-revert-8c40426.patch b/1.79.0-revert-8c40426.patch
new file mode 100644
index 0000000..3d1bb75
--- /dev/null
+++ b/1.79.0-revert-8c40426.patch
@@ -0,0 +1,16 @@
+This reverts commit 8c40426051a667673cdac9975f84cb6acd4e245f.
+
+https://bugs.gentoo.org/933382
+
+--- a/src/bootstrap/src/core/build_steps/llvm.rs
++++ b/src/bootstrap/src/core/build_steps/llvm.rs
+@@ -724,8 +724,7 @@ fn configure_cmake(
+             }
+         }
+         cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
+-            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
+-            .define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
++            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx));
+     }
+ 
+     cfg.build_arg("-j").build_arg(builder.jobs().to_string());


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
@ 2025-06-02  9:25 Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f9d03694650bce7be03e99f95d860675a849f3ca
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:22:17 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:22:17 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=f9d03694

Add patches for Rust 1.80.1-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.74.1-cross-compile-libz.patch
- 1.78.0-musl-dynamic-linking.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 24 ----------------------
 1 file changed, 24 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 742c81a..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-06-02  9:48 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     3c0c82412ea438ded6533022a9a026e2ce295bbb
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=3c0c8241

Initial commit with README

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 README.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..9999e72
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,24 @@
+###################
+Gentoo Rust Patches
+###################
+
+This repository contains patches required to build Rust on Gentoo Linux. These patches were previously
+part of the main Gentoo repository but have been moved here due to their size and to make maintenance easier.
+
+The patches are applied to the Rust source code during the build process. They address various issues such as
+compatibility with the Gentoo environment, specific compiler flags, and other adjustments needed for a successful build,
+or are backports to fix specific issues.
+
+Usage
+=====
+
+A branch will be created for each new Rust release (e.g. ``1.88``), and patches will be added to that branch as needed.
+
+Tags for ``${PV}`` will be created for each release, e.g. ``1.88.0``, ``1.88.1``, etc., to track the specific versions of
+Rust that these patches apply to. Revbumps will be tagged as required - if a patch is added or updated, a tag will be
+created for the new version (e.g. ``1.88.0-r1``).
+
+``master`` will contain patches required for ``nightly`` (live / ``9999``) ebuilds and will be updated as needed.
+
+To use the patches, you can clone this repository and apply the patches to the Rust source code before building
+(or use the Gentoo ebuild system which will handle this automatically!).


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
@ 2025-06-02  9:48 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     641e913b060eebb74e65070cf974535db2225f4b
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=641e913b

Add patches for Rust 1.77.1-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.75.0-musl-dynamic-linking.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch | 39 ------------------------------------
 1 file changed, 39 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
deleted file mode 100644
index 5d39022..0000000
--- a/1.75.0-handle-vendored-sources.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-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>
---- 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
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
@ 2025-06-02  9:48 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     0e1b58fe7443c58d224889526912952cd2436cc3
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=0e1b58fe

Add patches for Rust 1.75.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.75.0-handle-vendored-sources.patch
- 1.75.0-musl-dynamic-linking.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch               | 39 ++++++++++++++++++++++
 ...king.patch => 1.75.0-musl-dynamic-linking.patch |  4 +--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
new file mode 100644
index 0000000..5d39022
--- /dev/null
+++ b/1.75.0-handle-vendored-sources.patch
@@ -0,0 +1,39 @@
+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>
+--- 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
+

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.75.0-musl-dynamic-linking.patch
similarity index 82%
rename from 1.62.1-musl-dynamic-linking.patch
rename to 1.75.0-musl-dynamic-linking.patch
index b64775c..7dc34f8 100644
--- a/1.62.1-musl-dynamic-linking.patch
+++ b/1.75.0-musl-dynamic-linking.patch
@@ -4,8 +4,8 @@ Date: Tue, 2 Aug 2022 18:32:53 -0500
 Subject: [PATCH] Enable dynamic linking by default for musl
 
 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
      base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
  


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-06-02  9:48 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     1b769dd682fdbe71091de1d7105086324f9c42a3
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=1b769dd6

Add patches for Rust 1.74.1-r101

Patches:
- 1.62.1-musl-dynamic-linking.patch
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.62.1-musl-dynamic-linking.patch                  | 19 +++++++++++++++
 1.67.0-doc-wasm.patch                              | 28 ++++++++++++++++++++++
 ....0-ignore-broken-and-non-applicable-tests.patch | 24 +++++++++++++++++++
 1.74.1-cross-compile-libz.patch                    | 17 +++++++++++++
 1.81.0-backport-bug937164.patch                    | 15 ++++++++++++
 1.81.0-backport-llvm-pr101761.patch                | 24 +++++++++++++++++++
 1.81.0-backport-llvm-pr101766.patch                | 23 ++++++++++++++++++
 7 files changed, 150 insertions(+)

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.62.1-musl-dynamic-linking.patch
new file mode 100644
index 0000000..b64775c
--- /dev/null
+++ b/1.62.1-musl-dynamic-linking.patch
@@ -0,0 +1,19 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+ 
+     // These targets statically link libc by default
+-    base.crt_static_default = true;
++    base.crt_static_default = false;
+ 
+     base
+ }
+-- 
+2.35.1

diff --git a/1.67.0-doc-wasm.patch b/1.67.0-doc-wasm.patch
new file mode 100644
index 0000000..30cb8b9
--- /dev/null
+++ b/1.67.0-doc-wasm.patch
@@ -0,0 +1,28 @@
+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`.
+--- 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/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.70.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 0000000..590f960
--- /dev/null
+++ b/1.70.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,24 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] Ignore broken and non-applicable tests
+
+c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+--- a/tests/ui/env-funky-keys.rs
++++ b/tests/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+ 
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+-- 
+2.24.1
+

diff --git a/1.74.1-cross-compile-libz.patch b/1.74.1-cross-compile-libz.patch
new file mode 100644
index 0000000..98cec09
--- /dev/null
+++ b/1.74.1-cross-compile-libz.patch
@@ -0,0 +1,17 @@
+https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22
+https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497
+
+--- 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/1.81.0-backport-bug937164.patch b/1.81.0-backport-bug937164.patch
new file mode 100644
index 0000000..a6e887d
--- /dev/null
+++ b/1.81.0-backport-bug937164.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+
+Unnecessary on 19+ because 2222fddfc0a2ff02036542511597839856289094 adds
+SmallVector and SmallVector is fixed by another patch.
+--- a/src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
++++ b/src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+@@ -13,6 +13,7 @@
+ #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+ #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+ 
++#include <cstdint>
+ #include <memory>
+ #include <string>
+ 

diff --git a/1.81.0-backport-llvm-pr101761.patch b/1.81.0-backport-llvm-pr101761.patch
new file mode 100644
index 0000000..bcc3fee
--- /dev/null
+++ b/1.81.0-backport-llvm-pr101761.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1
+https://github.com/llvm/llvm-project/pull/101761
+
+From 7e44305041d96b064c197216b931ae3917a34ac1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Aug 2024 23:07:21 +0100
+Subject: [PATCH] [ADT] Add `<cstdint>` to SmallVector (#101761)
+
+SmallVector uses `uint32_t`, `uint64_t` without including `<cstdint>`
+which fails to build w/ GCC 15 after a change in libstdc++ [0]
+
+[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
+--- a/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
++++ b/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
+@@ -19,6 +19,7 @@
+ #include <algorithm>
+ #include <cassert>
+ #include <cstddef>
++#include <cstdint>
+ #include <cstdlib>
+ #include <cstring>
+ #include <functional>

diff --git a/1.81.0-backport-llvm-pr101766.patch b/1.81.0-backport-llvm-pr101766.patch
new file mode 100644
index 0000000..1bc84d0
--- /dev/null
+++ b/1.81.0-backport-llvm-pr101766.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+https://github.com/llvm/llvm-project/pull/101766
+
+From 5b69d0cf697f0d78406a5a7ed18eaa4f57a0580a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Aug 2024 23:38:55 +0100
+Subject: [PATCH] [AMDGPU] Include `<cstdint>` in AMDGPUMCTargetDesc
+
+createAMDGPUELFObjectWriter uses `uint8_t` without including `<cstdint>`
+which fails to build w/ GCC 15 after a change in libstdc++ [0].
+
+[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
+--- a/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
++++ b/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+@@ -15,6 +15,7 @@
+ #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+ #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+ 
++#include <cstdint>
+ #include <memory>
+ 
+ namespace llvm {


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
@ 2025-06-02  9:48 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     22f344960f242b45fc42a9293ac34fdf4fe5cb48
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=22f34496

Add patches for Rust 1.76.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.75.0-handle-vendored-sources.patch
- 1.75.0-musl-dynamic-linking.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
new file mode 100644
index 0000000..02bfeca
--- /dev/null
+++ b/1.76.0-loong-code-model.patch
@@ -0,0 +1,73 @@
+https://github.com/rust-lang/rust/pull/120661
+From: WANG Xuerui <xen0n@gentoo.org>
+Date: Mon, 5 Feb 2024 13:18:32 +0800
+Subject: [PATCH] target: default to the medium code model on LoongArch targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Rust LoongArch targets have been using the default LLVM code model
+so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
+As described in the "Code Model" section of LoongArch ELF psABI spec
+v20231219 [1], one can only make function calls as far as ±128MiB with
+the "normal" code model; this is insufficient for very large software
+containing Rust components that needs to be linked into the big text
+section, such as Chromium.
+
+Because:
+
+* we do not want to ask users to recompile std if they are to build
+  such software,
+* objects compiled with larger code models can be linked with those
+  with smaller code models without problems, and
+* the "medium" code model is comparable to the "small"/"normal" one
+  performance-wise (same data access pattern; each function call
+  becomes 2-insn long and indirect, but this may be relaxed back into
+  the direct 1-insn form in a future LLVM version), but is able to
+  perform function calls within ±128GiB,
+
+it is better to just switch the targets to the "medium" code model,
+which is also "medium" in LLVM-speak.
+
+[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
+@@ -1,4 +1,4 @@
+-use crate::spec::{base, Target, TargetOptions};
++use crate::spec::{base, CodeModel, Target, TargetOptions};
+ 
+ pub fn target() -> Target {
+     Target {
+@@ -7,6 +7,7 @@ pub fn target() -> Target {
+         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
+         arch: "loongarch64".into(),
+         options: TargetOptions {
++            code_model: Some(CodeModel::Medium),
+             cpu: "generic".into(),
+             features: "+f,+d".into(),
+             llvm_abiname: "lp64d".into(),
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
+@@ -16,7 +16,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
+@@ -17,7 +17,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+-- 
+2.43.0
+


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
@ 2025-06-02  9:48 Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     bdf58e68b15514236423536e45aa645c698f0753
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:09 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:09 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=bdf58e68

Add patches for Rust 1.80.1-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.78.0-musl-dynamic-linking.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 24 ----------------------
 1 file changed, 24 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 742c81a..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
@ 2025-06-02  9:48 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-02  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     ad60b82acf7da85c29d507c1baa8723274864bf0
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  2 09:47:08 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jun  2 09:47:08 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=ad60b82a

Add patches for Rust 1.78.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.78.0-ignore-broken-and-non-applicable-tests.patch
- 1.78.0-musl-dynamic-linking.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch                      | 73 ----------------------
 ....0-ignore-broken-and-non-applicable-tests.patch | 12 ++--
 ...king.patch => 1.78.0-musl-dynamic-linking.patch |  2 +-
 1.79.0-revert-8c40426.patch                        | 16 +++++
 4 files changed, 23 insertions(+), 80 deletions(-)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
deleted file mode 100644
index 02bfeca..0000000
--- a/1.76.0-loong-code-model.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://github.com/rust-lang/rust/pull/120661
-From: WANG Xuerui <xen0n@gentoo.org>
-Date: Mon, 5 Feb 2024 13:18:32 +0800
-Subject: [PATCH] target: default to the medium code model on LoongArch targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The Rust LoongArch targets have been using the default LLVM code model
-so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
-As described in the "Code Model" section of LoongArch ELF psABI spec
-v20231219 [1], one can only make function calls as far as ±128MiB with
-the "normal" code model; this is insufficient for very large software
-containing Rust components that needs to be linked into the big text
-section, such as Chromium.
-
-Because:
-
-* we do not want to ask users to recompile std if they are to build
-  such software,
-* objects compiled with larger code models can be linked with those
-  with smaller code models without problems, and
-* the "medium" code model is comparable to the "small"/"normal" one
-  performance-wise (same data access pattern; each function call
-  becomes 2-insn long and indirect, but this may be relaxed back into
-  the direct 1-insn form in a future LLVM version), but is able to
-  perform function calls within ±128GiB,
-
-it is better to just switch the targets to the "medium" code model,
-which is also "medium" in LLVM-speak.
-
-[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-@@ -1,4 +1,4 @@
--use crate::spec::{base, Target, TargetOptions};
-+use crate::spec::{base, CodeModel, Target, TargetOptions};
- 
- pub fn target() -> Target {
-     Target {
-@@ -7,6 +7,7 @@ pub fn target() -> Target {
-         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
-         arch: "loongarch64".into(),
-         options: TargetOptions {
-+            code_model: Some(CodeModel::Medium),
-             cpu: "generic".into(),
-             features: "+f,+d".into(),
-             llvm_abiname: "lp64d".into(),
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-@@ -16,7 +16,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-@@ -17,7 +17,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
--- 
-2.43.0
-

diff --git a/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
similarity index 80%
rename from 1.70.0-ignore-broken-and-non-applicable-tests.patch
rename to 1.78.0-ignore-broken-and-non-applicable-tests.patch
index 590f960..742c81a 100644
--- a/1.70.0-ignore-broken-and-non-applicable-tests.patch
+++ b/1.78.0-ignore-broken-and-non-applicable-tests.patch
@@ -12,13 +12,13 @@ sysroot-crates-are-unstable: can't run rustc without RPATH
 --- a/tests/ui/env-funky-keys.rs
 +++ b/tests/ui/env-funky-keys.rs
 @@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
+ //@ run-pass
+ //@ Ignore this test on Android, because it segfaults there.
  
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-cloudabi no execve
 -- 
 2.24.1
 

diff --git a/1.75.0-musl-dynamic-linking.patch b/1.78.0-musl-dynamic-linking.patch
similarity index 88%
rename from 1.75.0-musl-dynamic-linking.patch
rename to 1.78.0-musl-dynamic-linking.patch
index 7dc34f8..25a281c 100644
--- a/1.75.0-musl-dynamic-linking.patch
+++ b/1.78.0-musl-dynamic-linking.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jory Pratt <anarchy@gentoo.org>
 --- a/compiler/rustc_target/src/spec/base/linux_musl.rs
 +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
-     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+     base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
  
      // These targets statically link libc by default
 -    base.crt_static_default = true;

diff --git a/1.79.0-revert-8c40426.patch b/1.79.0-revert-8c40426.patch
new file mode 100644
index 0000000..3d1bb75
--- /dev/null
+++ b/1.79.0-revert-8c40426.patch
@@ -0,0 +1,16 @@
+This reverts commit 8c40426051a667673cdac9975f84cb6acd4e245f.
+
+https://bugs.gentoo.org/933382
+
+--- a/src/bootstrap/src/core/build_steps/llvm.rs
++++ b/src/bootstrap/src/core/build_steps/llvm.rs
+@@ -724,8 +724,7 @@ fn configure_cmake(
+             }
+         }
+         cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
+-            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
+-            .define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
++            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx));
+     }
+ 
+     cfg.build_arg("-j").build_arg(builder.jobs().to_string());


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
@ 2025-06-03  4:33 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     464fd32ed05e175b359ca4ba05e2418095c125dd
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:38 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:38 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=464fd32e

Initial commit with README

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 README.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..9999e72
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,24 @@
+###################
+Gentoo Rust Patches
+###################
+
+This repository contains patches required to build Rust on Gentoo Linux. These patches were previously
+part of the main Gentoo repository but have been moved here due to their size and to make maintenance easier.
+
+The patches are applied to the Rust source code during the build process. They address various issues such as
+compatibility with the Gentoo environment, specific compiler flags, and other adjustments needed for a successful build,
+or are backports to fix specific issues.
+
+Usage
+=====
+
+A branch will be created for each new Rust release (e.g. ``1.88``), and patches will be added to that branch as needed.
+
+Tags for ``${PV}`` will be created for each release, e.g. ``1.88.0``, ``1.88.1``, etc., to track the specific versions of
+Rust that these patches apply to. Revbumps will be tagged as required - if a patch is added or updated, a tag will be
+created for the new version (e.g. ``1.88.0-r1``).
+
+``master`` will contain patches required for ``nightly`` (live / ``9999``) ebuilds and will be updated as needed.
+
+To use the patches, you can clone this repository and apply the patches to the Rust source code before building
+(or use the Gentoo ebuild system which will handle this automatically!).


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
@ 2025-06-03  4:33 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     fbb876447e7ac1f204e7a1687507d2753ce59628
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:39 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:39 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=fbb87644

Add patches for Rust 1.75.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.75.0-handle-vendored-sources.patch
- 1.75.0-musl-dynamic-linking.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch               | 45 ++++++++++++++++++++++
 ...king.patch => 1.75.0-musl-dynamic-linking.patch | 10 +----
 2 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
new file mode 100644
index 0000000..c68ceba
--- /dev/null
+++ b/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
+

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.75.0-musl-dynamic-linking.patch
similarity index 58%
rename from 1.62.1-musl-dynamic-linking.patch
rename to 1.75.0-musl-dynamic-linking.patch
index fd56396..7dc34f8 100644
--- a/1.62.1-musl-dynamic-linking.patch
+++ b/1.75.0-musl-dynamic-linking.patch
@@ -4,14 +4,8 @@ Date: Tue, 2 Aug 2022 18:32:53 -0500
 Subject: [PATCH] Enable dynamic linking by default for musl
 
 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
----
- compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab0..8a5a43363 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
      base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
  


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
@ 2025-06-03  4:33 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     393b2e904eeb04515d75f24a948aa26f16098529
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:39 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:39 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=393b2e90

Add patches for Rust 1.76.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.75.0-handle-vendored-sources.patch
- 1.75.0-musl-dynamic-linking.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
new file mode 100644
index 0000000..02bfeca
--- /dev/null
+++ b/1.76.0-loong-code-model.patch
@@ -0,0 +1,73 @@
+https://github.com/rust-lang/rust/pull/120661
+From: WANG Xuerui <xen0n@gentoo.org>
+Date: Mon, 5 Feb 2024 13:18:32 +0800
+Subject: [PATCH] target: default to the medium code model on LoongArch targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Rust LoongArch targets have been using the default LLVM code model
+so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
+As described in the "Code Model" section of LoongArch ELF psABI spec
+v20231219 [1], one can only make function calls as far as ±128MiB with
+the "normal" code model; this is insufficient for very large software
+containing Rust components that needs to be linked into the big text
+section, such as Chromium.
+
+Because:
+
+* we do not want to ask users to recompile std if they are to build
+  such software,
+* objects compiled with larger code models can be linked with those
+  with smaller code models without problems, and
+* the "medium" code model is comparable to the "small"/"normal" one
+  performance-wise (same data access pattern; each function call
+  becomes 2-insn long and indirect, but this may be relaxed back into
+  the direct 1-insn form in a future LLVM version), but is able to
+  perform function calls within ±128GiB,
+
+it is better to just switch the targets to the "medium" code model,
+which is also "medium" in LLVM-speak.
+
+[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
+@@ -1,4 +1,4 @@
+-use crate::spec::{base, Target, TargetOptions};
++use crate::spec::{base, CodeModel, Target, TargetOptions};
+ 
+ pub fn target() -> Target {
+     Target {
+@@ -7,6 +7,7 @@ pub fn target() -> Target {
+         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
+         arch: "loongarch64".into(),
+         options: TargetOptions {
++            code_model: Some(CodeModel::Medium),
+             cpu: "generic".into(),
+             features: "+f,+d".into(),
+             llvm_abiname: "lp64d".into(),
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
+@@ -16,7 +16,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
+@@ -17,7 +17,7 @@ pub fn target() -> Target {
+             max_atomic_width: Some(64),
+             relocation_model: RelocModel::Static,
+             panic_strategy: PanicStrategy::Abort,
+-            code_model: Some(CodeModel::Small),
++            code_model: Some(CodeModel::Medium),
+             ..Default::default()
+         },
+     }
+-- 
+2.43.0
+


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
@ 2025-06-03  4:33 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     090ff7966c33e0ef08b2fb43dc245d98ccd04be6
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:38 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:38 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=090ff796

Add patches for Rust 1.74.1-r101

Patches:
- 1.62.1-musl-dynamic-linking.patch
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.62.1-musl-dynamic-linking.patch                  | 25 ++++++++++++++++
 1.67.0-doc-wasm.patch                              | 34 ++++++++++++++++++++++
 ....0-ignore-broken-and-non-applicable-tests.patch | 30 +++++++++++++++++++
 1.74.1-cross-compile-libz.patch                    | 17 +++++++++++
 1.81.0-backport-bug937164.patch                    | 15 ++++++++++
 1.81.0-backport-llvm-pr101761.patch                | 30 +++++++++++++++++++
 1.81.0-backport-llvm-pr101766.patch                | 29 ++++++++++++++++++
 7 files changed, 180 insertions(+)

diff --git a/1.62.1-musl-dynamic-linking.patch b/1.62.1-musl-dynamic-linking.patch
new file mode 100644
index 0000000..fd56396
--- /dev/null
+++ b/1.62.1-musl-dynamic-linking.patch
@@ -0,0 +1,25 @@
+From e42709c46647dab342b826d30324f3e6e5590e00 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 2 Aug 2022 18:32:53 -0500
+Subject: [PATCH] Enable dynamic linking by default for musl
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ compiler/rustc_target/src/spec/linux_musl_base.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
+index 207a87ab0..8a5a43363 100644
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
+     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+ 
+     // These targets statically link libc by default
+-    base.crt_static_default = true;
++    base.crt_static_default = false;
+ 
+     base
+ }
+-- 
+2.35.1

diff --git a/1.67.0-doc-wasm.patch b/1.67.0-doc-wasm.patch
new file mode 100644
index 0000000..06011de
--- /dev/null
+++ b/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/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.70.0-ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 0000000..2e12c78
--- /dev/null
+++ b/1.70.0-ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,30 @@
+From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 12/15] Ignore broken and non-applicable tests
+
+c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
+sparc-struct-abi: no sparc target
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ test/ui/env-funky-keys.rs                                   | 1 +
+ 6 files changed, 10 insertions(+)
+
+diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
+index c5c824ac58d..f3fe047a79c 100644
+--- a/tests/ui/env-funky-keys.rs
++++ b/tests/ui/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ // run-pass
+ // Ignore this test on Android, because it segfaults there.
+ 
++// ignore-test
+ // ignore-android
+ // ignore-windows
+ // ignore-cloudabi no execve
+-- 
+2.24.1
+

diff --git a/1.74.1-cross-compile-libz.patch b/1.74.1-cross-compile-libz.patch
new file mode 100644
index 0000000..98cec09
--- /dev/null
+++ b/1.74.1-cross-compile-libz.patch
@@ -0,0 +1,17 @@
+https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22
+https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497
+
+--- 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/1.81.0-backport-bug937164.patch b/1.81.0-backport-bug937164.patch
new file mode 100644
index 0000000..a6e887d
--- /dev/null
+++ b/1.81.0-backport-bug937164.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+
+Unnecessary on 19+ because 2222fddfc0a2ff02036542511597839856289094 adds
+SmallVector and SmallVector is fixed by another patch.
+--- a/src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
++++ b/src/llvm-project/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
+@@ -13,6 +13,7 @@
+ #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+ #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCTARGETDESC_H
+ 
++#include <cstdint>
+ #include <memory>
+ #include <string>
+ 

diff --git a/1.81.0-backport-llvm-pr101761.patch b/1.81.0-backport-llvm-pr101761.patch
new file mode 100644
index 0000000..fccb22d
--- /dev/null
+++ b/1.81.0-backport-llvm-pr101761.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1
+https://github.com/llvm/llvm-project/pull/101761
+
+From 7e44305041d96b064c197216b931ae3917a34ac1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Aug 2024 23:07:21 +0100
+Subject: [PATCH] [ADT] Add `<cstdint>` to SmallVector (#101761)
+
+SmallVector uses `uint32_t`, `uint64_t` without including `<cstdint>`
+which fails to build w/ GCC 15 after a change in libstdc++ [0]
+
+[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
+---
+ src/llvm-project/llvm/include/llvm/ADT/SmallVector.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h b/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
+index 09676d792dfebd..17444147b102a9 100644
+--- a/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
++++ b/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h
+@@ -19,6 +19,7 @@
+ #include <algorithm>
+ #include <cassert>
+ #include <cstddef>
++#include <cstdint>
+ #include <cstdlib>
+ #include <cstring>
+ #include <functional>

diff --git a/1.81.0-backport-llvm-pr101766.patch b/1.81.0-backport-llvm-pr101766.patch
new file mode 100644
index 0000000..fdecdaf
--- /dev/null
+++ b/1.81.0-backport-llvm-pr101766.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/937525
+https://bugs.gentoo.org/937164
+https://github.com/llvm/llvm-project/pull/101766
+
+From 5b69d0cf697f0d78406a5a7ed18eaa4f57a0580a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Aug 2024 23:38:55 +0100
+Subject: [PATCH] [AMDGPU] Include `<cstdint>` in AMDGPUMCTargetDesc
+
+createAMDGPUELFObjectWriter uses `uint8_t` without including `<cstdint>`
+which fails to build w/ GCC 15 after a change in libstdc++ [0].
+
+[0] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
+---
+ src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h b/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+index 3ef00f75735b0d..879dbe1b279b18 100644
+--- a/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
++++ b/src/llvm-project/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h
+@@ -15,6 +15,7 @@
+ #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+ #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCTARGETDESC_H
+ 
++#include <cstdint>
+ #include <memory>
+ 
+ namespace llvm {


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
@ 2025-06-03  4:33 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     cfb7ecd30d8df18659f1767cb09f005d011b5ba1
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:39 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:39 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=cfb7ecd3

Add patches for Rust 1.77.1-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.70.0-ignore-broken-and-non-applicable-tests.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.75.0-musl-dynamic-linking.patch
- 1.76.0-loong-code-model.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.75.0-handle-vendored-sources.patch | 45 ------------------------------------
 1 file changed, 45 deletions(-)

diff --git a/1.75.0-handle-vendored-sources.patch b/1.75.0-handle-vendored-sources.patch
deleted file mode 100644
index c68ceba..0000000
--- a/1.75.0-handle-vendored-sources.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-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
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
  2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
@ 2025-06-03  4:33 ` Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     df4b25f466eece5a5fc2610863942c8e2560ecb6
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:39 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:39 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=df4b25f4

Add patches for Rust 1.78.0-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.78.0-ignore-broken-and-non-applicable-tests.patch
- 1.78.0-musl-dynamic-linking.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 1.76.0-loong-code-model.patch                      | 73 ----------------------
 ....0-ignore-broken-and-non-applicable-tests.patch | 12 ++--
 ...king.patch => 1.78.0-musl-dynamic-linking.patch |  2 +-
 1.79.0-revert-8c40426.patch                        | 18 ++++++
 4 files changed, 25 insertions(+), 80 deletions(-)

diff --git a/1.76.0-loong-code-model.patch b/1.76.0-loong-code-model.patch
deleted file mode 100644
index 02bfeca..0000000
--- a/1.76.0-loong-code-model.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://github.com/rust-lang/rust/pull/120661
-From: WANG Xuerui <xen0n@gentoo.org>
-Date: Mon, 5 Feb 2024 13:18:32 +0800
-Subject: [PATCH] target: default to the medium code model on LoongArch targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The Rust LoongArch targets have been using the default LLVM code model
-so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
-As described in the "Code Model" section of LoongArch ELF psABI spec
-v20231219 [1], one can only make function calls as far as ±128MiB with
-the "normal" code model; this is insufficient for very large software
-containing Rust components that needs to be linked into the big text
-section, such as Chromium.
-
-Because:
-
-* we do not want to ask users to recompile std if they are to build
-  such software,
-* objects compiled with larger code models can be linked with those
-  with smaller code models without problems, and
-* the "medium" code model is comparable to the "small"/"normal" one
-  performance-wise (same data access pattern; each function call
-  becomes 2-insn long and indirect, but this may be relaxed back into
-  the direct 1-insn form in a future LLVM version), but is able to
-  perform function calls within ±128GiB,
-
-it is better to just switch the targets to the "medium" code model,
-which is also "medium" in LLVM-speak.
-
-[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
-@@ -1,4 +1,4 @@
--use crate::spec::{base, Target, TargetOptions};
-+use crate::spec::{base, CodeModel, Target, TargetOptions};
- 
- pub fn target() -> Target {
-     Target {
-@@ -7,6 +7,7 @@ pub fn target() -> Target {
-         data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
-         arch: "loongarch64".into(),
-         options: TargetOptions {
-+            code_model: Some(CodeModel::Medium),
-             cpu: "generic".into(),
-             features: "+f,+d".into(),
-             llvm_abiname: "lp64d".into(),
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
-@@ -16,7 +16,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
---- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-+++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
-@@ -17,7 +17,7 @@ pub fn target() -> Target {
-             max_atomic_width: Some(64),
-             relocation_model: RelocModel::Static,
-             panic_strategy: PanicStrategy::Abort,
--            code_model: Some(CodeModel::Small),
-+            code_model: Some(CodeModel::Medium),
-             ..Default::default()
-         },
-     }
--- 
-2.43.0
-

diff --git a/1.70.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
similarity index 84%
rename from 1.70.0-ignore-broken-and-non-applicable-tests.patch
rename to 1.78.0-ignore-broken-and-non-applicable-tests.patch
index 2e12c78..610e5d0 100644
--- a/1.70.0-ignore-broken-and-non-applicable-tests.patch
+++ b/1.78.0-ignore-broken-and-non-applicable-tests.patch
@@ -18,13 +18,13 @@ index c5c824ac58d..f3fe047a79c 100644
 --- a/tests/ui/env-funky-keys.rs
 +++ b/tests/ui/env-funky-keys.rs
 @@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
+ //@ run-pass
+ //@ Ignore this test on Android, because it segfaults there.
  
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-cloudabi no execve
 -- 
 2.24.1
 

diff --git a/1.75.0-musl-dynamic-linking.patch b/1.78.0-musl-dynamic-linking.patch
similarity index 88%
rename from 1.75.0-musl-dynamic-linking.patch
rename to 1.78.0-musl-dynamic-linking.patch
index 7dc34f8..25a281c 100644
--- a/1.75.0-musl-dynamic-linking.patch
+++ b/1.78.0-musl-dynamic-linking.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jory Pratt <anarchy@gentoo.org>
 --- a/compiler/rustc_target/src/spec/base/linux_musl.rs
 +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
 @@ -10,7 +10,7 @@ pub fn opts() -> TargetOptions {
-     base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+     base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
  
      // These targets statically link libc by default
 -    base.crt_static_default = true;

diff --git a/1.79.0-revert-8c40426.patch b/1.79.0-revert-8c40426.patch
new file mode 100644
index 0000000..583f400
--- /dev/null
+++ b/1.79.0-revert-8c40426.patch
@@ -0,0 +1,18 @@
+This reverts commit 8c40426051a667673cdac9975f84cb6acd4e245f.
+
+https://bugs.gentoo.org/933382
+
+diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
+index d4473e24039..58f351d17fa 100644
+--- a/src/bootstrap/src/core/build_steps/llvm.rs
++++ b/src/bootstrap/src/core/build_steps/llvm.rs
+@@ -724,8 +724,7 @@ fn configure_cmake(
+             }
+         }
+         cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
+-            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx))
+-            .define("CMAKE_ASM_COMPILER", sanitize_cc(&cc));
++            .define("CMAKE_CXX_COMPILER", sanitize_cc(&cxx));
+     }
+ 
+     cfg.build_arg("-j").build_arg(builder.jobs().to_string());


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [gentoo-commits] proj/rust-patches:1.80 commit in: /
@ 2025-06-03  4:33 Matt Jolly
  0 siblings, 0 replies; 47+ messages in thread
From: Matt Jolly @ 2025-06-03  4:33 UTC (permalink / raw
  To: gentoo-commits

commit:     4c3b3e1257c8b4ccb8ce1b9770179326ce8093a4
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 04:31:39 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 04:31:39 2025 +0000
URL:        https://gitweb.gentoo.org/proj/rust-patches.git/commit/?id=4c3b3e12

Add patches for Rust 1.80.1-r101

Patches:
- 1.67.0-doc-wasm.patch
- 1.74.1-cross-compile-libz.patch
- 1.81.0-backport-bug937164.patch
- 1.81.0-backport-llvm-pr101761.patch
- 1.81.0-backport-llvm-pr101766.patch
- 1.78.0-musl-dynamic-linking.patch
- 1.79.0-revert-8c40426.patch

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 ....0-ignore-broken-and-non-applicable-tests.patch | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/1.78.0-ignore-broken-and-non-applicable-tests.patch b/1.78.0-ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index 610e5d0..0000000
--- a/1.78.0-ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 12/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- test/ui/env-funky-keys.rs                                   | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
-index c5c824ac58d..f3fe047a79c 100644
---- a/tests/ui/env-funky-keys.rs
-+++ b/tests/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- //@ run-pass
- //@ Ignore this test on Android, because it segfaults there.
- 
-+//@ ignore-test
- //@ ignore-android
- //@ ignore-windows
- //@ ignore-cloudabi no execve
--- 
-2.24.1
-


^ permalink raw reply related	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2025-06-03  4:34 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.80 commit in: / Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.82 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.83 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.84 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.85 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.86 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.87 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.88 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:master " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80.1-r101 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.81.0-r101 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 " Matt Jolly
  -- strict thread matches above, loose matches on Subject: below --
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
2025-06-03  4:33 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
2025-06-03  4:33 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
2025-06-03  4:33 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
2025-06-03  4:33 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
2025-06-03  4:33 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-03  4:33 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-06-03  4:33 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:48 Matt Jolly
2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
2025-06-02  9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
2025-06-02  9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
2025-06-02  9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
2025-06-02  9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-06-02  9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:48 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-06-02  9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:25 Matt Jolly
2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
2025-06-02  9:25 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
2025-06-02  9:25 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
2025-06-02  9:25 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-06-02  9:25 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-06-02  9:25 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-06-02  9:25 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
2025-06-02  9:25 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:55 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
2025-05-31  5:55 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:53 Matt Jolly
2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly
2025-05-31  5:53 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly
2025-05-31  5:53 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly
2025-05-31  5:53 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly
2025-05-31  5:53 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-05-31  5:53 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly
2025-05-31  5:53 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly
2025-05-31  5:53 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox