* [gentoo-commits] proj/rust-patches:1.76 commit in: / @ 2025-06-02 9:48 Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly ` (27 more replies) 0 siblings, 28 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.77 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.78 " Matt Jolly ` (26 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.78 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.77 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.80 " Matt Jolly ` (25 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.80 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / 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.78 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.79 " Matt Jolly ` (24 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.79 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (2 preceding siblings ...) 2025-06-02 9:48 ` [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.82 " Matt Jolly ` (23 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.82 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (3 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.79 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly ` (22 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.81 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (4 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.82 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.83 " Matt Jolly ` (21 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.83 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (5 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.84 " Matt Jolly ` (20 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.84 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (6 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.83 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.85 " Matt Jolly ` (19 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.85 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (7 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.84 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.86 " Matt Jolly ` (18 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.86 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (8 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.85 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.87 " Matt Jolly ` (17 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.87 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (9 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.86 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.88 " Matt Jolly ` (16 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.88 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (10 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.87 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:master " Matt Jolly ` (15 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:master commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (11 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.88 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.77.1-r101 " Matt Jolly ` (14 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.77.1-r101 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (12 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:master " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly ` (13 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (13 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.77.1-r101 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.78.0-r101 " Matt Jolly ` (12 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.78.0-r101 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (14 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.79.0-r101 " Matt Jolly ` (11 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.79.0-r101 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (15 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.78.0-r101 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.81.0-r101 " Matt Jolly ` (10 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.81.0-r101 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (16 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.79.0-r101 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.80.1-r101 " Matt Jolly ` (9 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.80.1-r101 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (17 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.81.0-r101 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.83.0-r3 " Matt Jolly ` (8 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.83.0-r3 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (18 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.80.1-r101 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.82.0-r103 " Matt Jolly ` (7 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.82.0-r103 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (19 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.83.0-r3 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.84.0-r2 " Matt Jolly ` (6 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.84.0-r2 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (20 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.82.0-r103 " Matt Jolly @ 2025-06-02 9:48 ` Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.84.1-r2 " Matt Jolly ` (5 subsequent siblings) 27 siblings, 0 replies; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.84.1-r2 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (21 preceding siblings ...) 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.84.0-r2 " Matt Jolly @ 2025-06-02 9:49 ` Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.85.0-r2 " Matt Jolly ` (4 subsequent siblings) 27 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:49 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.85.0-r2 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (22 preceding siblings ...) 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.84.1-r2 " Matt Jolly @ 2025-06-02 9:49 ` Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.85.1-r1 " Matt Jolly ` (3 subsequent siblings) 27 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:49 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.85.1-r1 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (23 preceding siblings ...) 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.85.0-r2 " Matt Jolly @ 2025-06-02 9:49 ` Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.86.0-r2 " Matt Jolly ` (2 subsequent siblings) 27 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:49 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.86.0-r2 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (24 preceding siblings ...) 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.85.1-r1 " Matt Jolly @ 2025-06-02 9:49 ` Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.87.0-r1 " Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 " Matt Jolly 27 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:49 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.87.0-r1 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (25 preceding siblings ...) 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.86.0-r2 " Matt Jolly @ 2025-06-02 9:49 ` Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 " Matt Jolly 27 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:49 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.88.0_beta20250526 commit in: / 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / Matt Jolly ` (26 preceding siblings ...) 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.87.0-r1 " Matt Jolly @ 2025-06-02 9:49 ` Matt Jolly 27 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:49 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.75 commit in: / @ 2025-06-03 4:33 Matt Jolly 2025-06-03 4:33 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76 commit in: / @ 2025-06-03 4:33 Matt Jolly 2025-06-03 4:33 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.75 commit in: / @ 2025-06-03 4:33 Matt Jolly 2025-06-03 4:33 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-06-03 4:33 Matt Jolly 2025-06-03 4:33 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.75 commit in: / @ 2025-06-02 9:48 Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-06-02 9:48 Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-06-02 9:48 Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76 commit in: / @ 2025-06-02 9:25 Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 commit in: / 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly @ 2025-06-02 9:34 ` Matt Jolly 0 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:34 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-06-02 9:25 Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 commit in: / 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly @ 2025-06-02 9:34 ` Matt Jolly 0 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:34 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-06-02 9:25 Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 commit in: / 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly @ 2025-06-02 9:34 ` Matt Jolly 0 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:34 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.75 commit in: / @ 2025-06-02 9:25 Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 commit in: / 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly @ 2025-06-02 9:34 ` Matt Jolly 0 siblings, 0 replies; 44+ messages in thread From: Matt Jolly @ 2025-06-02 9:34 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-05-31 5:55 Matt Jolly 2025-05-31 5:55 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.74 commit in: / @ 2025-05-31 5:55 Matt Jolly 2025-05-31 5:55 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76 commit in: / @ 2025-05-31 5:55 Matt Jolly 2025-05-31 5:55 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.75 commit in: / @ 2025-05-31 5:55 Matt Jolly 2025-05-31 5:55 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 0 siblings, 1 reply; 44+ 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] 44+ messages in thread
* [gentoo-commits] proj/rust-patches:1.76.0-r101 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; 44+ 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] 44+ messages in thread
end of thread, other threads:[~2025-06-03 4:37 UTC | newest] Thread overview: 44+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-02 9:48 [gentoo-commits] proj/rust-patches:1.76 commit in: / 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.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.79 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.82 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.81 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.83 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.84 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.85 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.86 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.87 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.88 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:master " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.77.1-r101 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.78.0-r101 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.79.0-r101 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.81.0-r101 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.80.1-r101 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.83.0-r3 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.82.0-r103 " Matt Jolly 2025-06-02 9:48 ` [gentoo-commits] proj/rust-patches:1.84.0-r2 " Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.84.1-r2 " Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.85.0-r2 " Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.85.1-r1 " Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.86.0-r2 " Matt Jolly 2025-06-02 9:49 ` [gentoo-commits] proj/rust-patches:1.87.0-r1 " Matt Jolly 2025-06-02 9:49 ` [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.75 " Matt Jolly 2025-06-03 4:33 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " Matt Jolly 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.76 " Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.74 " Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " Matt Jolly 2025-06-02 9:25 [gentoo-commits] proj/rust-patches:1.75 " Matt Jolly 2025-06-02 9:34 ` [gentoo-commits] proj/rust-patches:1.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " 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.76.0-r101 " Matt Jolly
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox