diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/upstream/d-disable-download-tests.patch (renamed from debian/patches/d-disable-download-tests.patch) | 17 | ||||
-rw-r--r-- | debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch | 21 | ||||
-rw-r--r-- | debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch | 47 | ||||
-rw-r--r-- | debian/patches/upstream/u-fix-get-toml-when-test.patch (renamed from debian/patches/u-fix-get-toml-when-test.patch) | 27 | ||||
-rw-r--r-- | debian/patches/upstream/u-hurd-tests.patch | 64 | ||||
-rw-r--r-- | debian/patches/upstream/u-ignore-ppc-hangs.patch (renamed from debian/patches/u-ignore-ppc-hangs.patch) | 20 | ||||
-rw-r--r-- | debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch (renamed from debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch) | 23 | ||||
-rw-r--r-- | debian/patches/upstream/u-rustc-llvm-cross-flags.patch (renamed from debian/patches/u-rustc-llvm-cross-flags.patch) | 10 |
8 files changed, 188 insertions, 41 deletions
diff --git a/debian/patches/d-disable-download-tests.patch b/debian/patches/upstream/d-disable-download-tests.patch index 48458cca2..85700f999 100644 --- a/debian/patches/d-disable-download-tests.patch +++ b/debian/patches/upstream/d-disable-download-tests.patch @@ -1,7 +1,16 @@ -Index: rust/src/bootstrap/src/tests/config.rs -=================================================================== ---- rust.orig/src/bootstrap/src/tests/config.rs -+++ rust/src/bootstrap/src/tests/config.rs +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:39 +0200 +Subject: d-disable-download-tests + +Forwarded: no +--- + src/bootstrap/src/tests/config.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/bootstrap/src/tests/config.rs b/src/bootstrap/src/tests/config.rs +index 6f43234..0f1471d 100644 +--- a/src/bootstrap/src/tests/config.rs ++++ b/src/bootstrap/src/tests/config.rs @@ -18,6 +18,9 @@ fn parse(config: &str) -> Config { #[test] diff --git a/debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch b/debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch new file mode 100644 index 000000000..491e51bf3 --- /dev/null +++ b/debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch @@ -0,0 +1,21 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:39 +0200 +Subject: d-ignore-test_arc_condvar_poison-ppc + +Forwarded: no +--- + library/std/src/sync/mutex/tests.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/tests.rs +index 1786a3c..812ec51 100644 +--- a/library/std/src/sync/mutex/tests.rs ++++ b/library/std/src/sync/mutex/tests.rs +@@ -145,6 +145,7 @@ fn test_mutex_arc_condvar() { + } + } + ++#[cfg(not(target_arch = "powerpc"))] + #[test] + fn test_arc_condvar_poison() { + let packet = Packet(Arc::new((Mutex::new(1), Condvar::new()))); diff --git a/debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch b/debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch new file mode 100644 index 000000000..905b2b075 --- /dev/null +++ b/debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch @@ -0,0 +1,47 @@ +From: Josh Stone <jistone@redhat.com> +Date: Mon, 8 Apr 2024 15:04:44 -0700 +Subject: [PATCH] Fix UI tests with dist-vendored dependencies + +There is already a workaround in `compiletest` to deal with custom +`CARGO_HOME` using `-Zignore-directory-in-diagnostics-source-blocks={}`. +A similar need exists when dependencies come from the local `vendor` +directory, which distro builds often use, so now we ignore that too. + +Also, `issue-21763.rs` was normalizing `hashbrown-` paths, presumably +expecting a version suffix, but the vendored path doesn't include the +version. Now that matches `[\\/]hashbrown` instead. + +Forwarded: yes +--- + src/tools/compiletest/src/runtest.rs | 5 +++++ + tests/ui/issues/issue-21763.rs | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs +index 5d53a4d..9bb30ad 100644 +--- a/src/tools/compiletest/src/runtest.rs ++++ b/src/tools/compiletest/src/runtest.rs +@@ -2342,6 +2342,11 @@ impl<'test> TestCx<'test> { + "ignore-directory-in-diagnostics-source-blocks={}", + home::cargo_home().expect("failed to find cargo home").to_str().unwrap() + )); ++ // Similarly, vendored sources shouldn't be shown when running from a dist tarball. ++ rustc.arg("-Z").arg(format!( ++ "ignore-directory-in-diagnostics-source-blocks={}", ++ self.config.find_rust_src_root().unwrap().join("vendor").display(), ++ )); + + // Optionally prevent default --sysroot if specified in test compile-flags. + if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) +diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs +index 38103ff..cc1a006 100644 +--- a/tests/ui/issues/issue-21763.rs ++++ b/tests/ui/issues/issue-21763.rs +@@ -1,6 +1,6 @@ + // Regression test for HashMap only impl'ing Send/Sync if its contents do + +-// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" ++// normalize-stderr-test: "\S+[\\/]hashbrown\S+" -> "$$HASHBROWN_SRC_LOCATION" + + use std::collections::HashMap; + use std::rc::Rc; diff --git a/debian/patches/u-fix-get-toml-when-test.patch b/debian/patches/upstream/u-fix-get-toml-when-test.patch index 09ba0552e..cbe054b73 100644 --- a/debian/patches/u-fix-get-toml-when-test.patch +++ b/debian/patches/upstream/u-fix-get-toml-when-test.patch @@ -1,16 +1,23 @@ -Description: Fix get_toml() when cfg(test) - When cfg(test), Config::parse doesn't parse a config.toml but uses default - values, failing when the initial rustc is needed. This is a workaround before - upstream issue gets solved. +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: Fix get_toml() when cfg(test) + Bug: https://github.com/rust-lang/rust/issues/105766 Last-Update: 2023-03-29 + +When cfg(test), Config::parse doesn't parse a config.toml but uses default +values, failing when the initial rustc is needed. This is a workaround before +upstream issue gets solved. +Last-Update: 2023-03-29 --- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: rust/src/bootstrap/src/core/config/config.rs -=================================================================== ---- rust.orig/src/bootstrap/src/core/config/config.rs -+++ rust/src/bootstrap/src/core/config/config.rs -@@ -1093,8 +1093,32 @@ impl Config { + src/bootstrap/src/core/config/config.rs | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index f1e1b89..738d2e1 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -1180,8 +1180,32 @@ impl Config { pub fn parse(args: &[String]) -> Config { #[cfg(test)] diff --git a/debian/patches/upstream/u-hurd-tests.patch b/debian/patches/upstream/u-hurd-tests.patch new file mode 100644 index 000000000..3f2740f32 --- /dev/null +++ b/debian/patches/upstream/u-hurd-tests.patch @@ -0,0 +1,64 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:39 +0200 +Subject: These tests hang or make the box OOM + +Forwarded: no +--- + tests/run-make/long-linker-command-lines/foo.rs | 7 +++++++ + tests/ui/associated-consts/issue-93775.rs | 1 + + tests/ui/issues/issue-74564-if-expr-stack-overflow.rs | 1 + + tests/ui/threads-sendsync/mpsc_stress.rs | 1 + + 4 files changed, 10 insertions(+) + +diff --git a/tests/run-make/long-linker-command-lines/foo.rs b/tests/run-make/long-linker-command-lines/foo.rs +index db238c0..c8ad6b8 100644 +--- a/tests/run-make/long-linker-command-lines/foo.rs ++++ b/tests/run-make/long-linker-command-lines/foo.rs +@@ -44,6 +44,13 @@ fn read_linker_args(path: &Path) -> String { + } + } + ++#[cfg(target_os = "hurd")] ++// Debian: test causes build to fail on hurd ++fn main() { ++ return; ++} ++ ++#[cfg(not(target_os = "hurd"))] + fn main() { + let tmpdir = PathBuf::from(env::var_os("TMPDIR").unwrap()); + let ok = tmpdir.join("ok"); +diff --git a/tests/ui/associated-consts/issue-93775.rs b/tests/ui/associated-consts/issue-93775.rs +index db788fe..ae4a64e 100644 +--- a/tests/ui/associated-consts/issue-93775.rs ++++ b/tests/ui/associated-consts/issue-93775.rs +@@ -1,5 +1,6 @@ + // build-pass + // ignore-tidy-linelength ++// ignore-hurd + + // Regression for #93775, needs build-pass to test it. + +diff --git a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs +index 36e9932..19c04b6 100644 +--- a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs ++++ b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs +@@ -1,5 +1,6 @@ + // build-pass + // ignore-tidy-filelength ++// ignore-hurd + #![crate_type = "rlib"] + + fn banana(v: &str) -> u32 { +diff --git a/tests/ui/threads-sendsync/mpsc_stress.rs b/tests/ui/threads-sendsync/mpsc_stress.rs +index c2e1912..a0e7b6d 100644 +--- a/tests/ui/threads-sendsync/mpsc_stress.rs ++++ b/tests/ui/threads-sendsync/mpsc_stress.rs +@@ -1,6 +1,7 @@ + // run-pass + // compile-flags:--test + // ignore-emscripten ++// ignore-hurd + + use std::sync::mpsc::channel; + use std::sync::mpsc::TryRecvError; diff --git a/debian/patches/u-ignore-ppc-hangs.patch b/debian/patches/upstream/u-ignore-ppc-hangs.patch index 705476199..f2311225a 100644 --- a/debian/patches/u-ignore-ppc-hangs.patch +++ b/debian/patches/upstream/u-ignore-ppc-hangs.patch @@ -8,11 +8,11 @@ Bug: https://github.com/rust-lang/rust/issues/89607 library/alloc/tests/rc.rs | 1 + 2 files changed, 2 insertions(+) -Index: rust/library/alloc/tests/arc.rs -=================================================================== ---- rust.orig/library/alloc/tests/arc.rs -+++ rust/library/alloc/tests/arc.rs -@@ -96,6 +96,7 @@ const SHARED_ITER_MAX: u16 = 100; +diff --git a/library/alloc/tests/arc.rs b/library/alloc/tests/arc.rs +index d564a30..b607abc 100644 +--- a/library/alloc/tests/arc.rs ++++ b/library/alloc/tests/arc.rs +@@ -95,6 +95,7 @@ const SHARED_ITER_MAX: u16 = 100; fn assert_trusted_len<I: TrustedLen>(_: &I) {} @@ -20,11 +20,11 @@ Index: rust/library/alloc/tests/arc.rs #[test] fn shared_from_iter_normal() { // Exercise the base implementation for non-`TrustedLen` iterators. -Index: rust/library/alloc/tests/rc.rs -=================================================================== ---- rust.orig/library/alloc/tests/rc.rs -+++ rust/library/alloc/tests/rc.rs -@@ -92,6 +92,7 @@ const SHARED_ITER_MAX: u16 = 100; +diff --git a/library/alloc/tests/rc.rs b/library/alloc/tests/rc.rs +index 499740e..e418a7d 100644 +--- a/library/alloc/tests/rc.rs ++++ b/library/alloc/tests/rc.rs +@@ -91,6 +91,7 @@ const SHARED_ITER_MAX: u16 = 100; fn assert_trusted_len<I: TrustedLen>(_: &I) {} diff --git a/debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch b/debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch index 6ca345e86..ced256d18 100644 --- a/debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch +++ b/debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch @@ -1,4 +1,3 @@ -From 471af8c5a382229e57656798900406e1ec82c5c8 Mon Sep 17 00:00:00 2001 From: kxxt <rsworktech@outlook.com> Date: Wed, 31 Jan 2024 09:02:18 +0800 Subject: [PATCH] riscv only supports split_debuginfo=off for now @@ -10,17 +9,17 @@ The packed/unpacked options might be supported in the future. See upstream issue for more details: https://github.com/llvm/llvm-project/issues/56642 -Fixes #110224 +Bug: https://github.com/rust-lang/rust/issues/110224 --- - .../src/spec/targets/riscv32gc_unknown_linux_gnu.rs | 5 ++++- - .../src/spec/targets/riscv32gc_unknown_linux_musl.rs | 5 ++++- - .../rustc_target/src/spec/targets/riscv64_linux_android.rs | 5 ++++- - .../src/spec/targets/riscv64gc_unknown_linux_gnu.rs | 5 ++++- - .../src/spec/targets/riscv64gc_unknown_linux_musl.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs | 5 ++++- + compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs -index 06e8f1837637f..0be32cbd77165 100644 +index 06e8f18..0be32cb 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs @@ -1,4 +1,6 @@ @@ -40,7 +39,7 @@ index 06e8f1837637f..0be32cbd77165 100644 }, } diff --git a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs -index 722703d2384fe..cfa9990dac9bd 100644 +index 722703d..cfa9990 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs @@ -1,4 +1,6 @@ @@ -60,7 +59,7 @@ index 722703d2384fe..cfa9990dac9bd 100644 }, } diff --git a/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs -index 40e447dbb8362..762197d7217c7 100644 +index 40e447d..762197d 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs @@ -1,4 +1,6 @@ @@ -80,7 +79,7 @@ index 40e447dbb8362..762197d7217c7 100644 }, } diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs -index c0969d4e11eb9..e71929a190479 100644 +index c0969d4..e71929a 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs @@ -1,4 +1,6 @@ @@ -100,7 +99,7 @@ index c0969d4e11eb9..e71929a190479 100644 }, } diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs -index 656e260d094d8..8ea28d6b162cc 100644 +index 656e260..8ea28d6 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs @@ -1,4 +1,6 @@ diff --git a/debian/patches/u-rustc-llvm-cross-flags.patch b/debian/patches/upstream/u-rustc-llvm-cross-flags.patch index 19b6d82c8..22f59eab2 100644 --- a/debian/patches/u-rustc-llvm-cross-flags.patch +++ b/debian/patches/upstream/u-rustc-llvm-cross-flags.patch @@ -7,11 +7,11 @@ Subject: u-rustc-llvm-cross-flags compiler/rustc_llvm/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: rust/compiler/rustc_llvm/build.rs -=================================================================== ---- rust.orig/compiler/rustc_llvm/build.rs -+++ rust/compiler/rustc_llvm/build.rs -@@ -305,7 +305,7 @@ fn main() { +diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs +index 4b0c122..77baa7b 100644 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -319,7 +319,7 @@ fn main() { if let Some(stripped) = lib.strip_prefix("-LIBPATH:") { println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target)); } else if let Some(stripped) = lib.strip_prefix("-L") { |