]> git.proxmox.com Git - rustc.git/commitdiff
Refresh patches
authorEric Long <i@hack3r.moe>
Tue, 25 Jul 2023 23:28:32 +0000 (07:28 +0800)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 14 Sep 2023 07:07:23 +0000 (09:07 +0200)
FG: drop rustix-sparc patch entirely

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/patches/d-bootstrap-disable-git.patch
debian/patches/d-bootstrap-old-cargo-compat.patch
debian/patches/d-fix-rustix-outline.patch
debian/patches/d-rust-gdb-paths
debian/patches/series
debian/patches/u-fix-rustix-for-sparc64.patch [deleted file]
debian/patches/u-fix-sysroot-detection-logic.patch [deleted file]
debian/patches/u-ignore-reproducible-failure.patch [deleted file]
debian/patches/u-make-tests-work-without-rpath.patch [deleted file]

index 3e744b5995b1cbaa4cd047c4fde7c40d332f7d57..6f7f3f2e433a458bfbd2282cb644f1806ac014d8 100644 (file)
@@ -15,7 +15,7 @@ Forwarded: not-needed
 @@ -36,6 +36,12 @@
  
  impl GitInfo {
-     pub fn new(ignore_git: bool, dir: &Path) -> GitInfo {
+     pub fn new(omit_git_hash: bool, dir: &Path) -> GitInfo {
 +        //
 +        // Debian: returning early because the Debian package is also in a git
 +        //         repository, but we don't want to parse gitinfo. This is
@@ -27,7 +27,7 @@ Forwarded: not-needed
              match read_commit_info_file(dir) {
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -968,7 +968,10 @@
+@@ -995,7 +995,10 @@
          }
  
          // If we're building from git sources, we need to vendor a complete distribution.
index 463e70369be4dd49409decb79396e323e470116d..a077e0c8f86650d675935476acacc5926a787bfc 100644 (file)
@@ -17,7 +17,7 @@ Subject: Backwards-compat for cargo 0.47
 
 --- a/src/bootstrap/doc.rs
 +++ b/src/bootstrap/doc.rs
-@@ -598,7 +598,6 @@
+@@ -612,7 +612,6 @@
              .arg(&*target_dir.to_string_lossy())
              .arg("-p")
              .arg(package)
@@ -25,15 +25,15 @@ Subject: Backwards-compat for cargo 0.47
              .arg("--")
              .arg("-Z")
              .arg("unstable-options")
-@@ -695,7 +694,6 @@
+@@ -712,7 +711,6 @@
          cargo.rustdocflag("--generate-link-to-definition");
-         compile::rustc_cargo(builder, &mut cargo, target);
+         compile::rustc_cargo(builder, &mut cargo, target, compiler.stage);
          cargo.arg("-Zunstable-options");
 -        cargo.arg("-Zskip-rustdoc-fingerprint");
  
          // Only include compiler crates, no dependencies of those, such as `libc`.
          // Do link to dependencies on `docs.rs` however using `rustdoc-map`.
-@@ -811,7 +809,6 @@
+@@ -845,7 +843,6 @@
                      &[],
                  );
  
index 91b8530de9c1df8e717c74fc1f2e2b45d3654ed5..324f880a372d3c4ea02a67cc113840884a505c5d 100644 (file)
@@ -5,9 +5,9 @@ outline asm.
 
 --- a/vendor/rustix/Cargo.toml
 +++ b/vendor/rustix/Cargo.toml
-@@ -115,9 +115,9 @@
+@@ -125,9 +125,9 @@
  [dev-dependencies.tempfile]
- version = "3.2.0"
+ version = "3.4.0"
  
 -[build-dependencies.cc]
 +[build-dependencies.cc_dep]
@@ -17,7 +17,7 @@ outline asm.
  
  [features]
  all-apis = [
-@@ -230,6 +230,7 @@
+@@ -242,6 +242,7 @@
      "Win32_NetworkManagement_IpHelper",
      "Win32_System_Threading",
  ]
@@ -34,7 +34,7 @@ outline asm.
  use std::env::var;
  use std::io::Write;
  
-@@ -118,16 +117,16 @@
+@@ -158,16 +157,16 @@
      println!("cargo:rerun-if-changed={}", to);
  
      // If "cc" is not enabled, use a pre-built library.
@@ -53,4 +53,4 @@ outline asm.
 +    //#[cfg(feature = "cc")]
      {
          let out_dir = var("OUT_DIR").unwrap();
-         Build::new().file(&asm_name).compile(&name);
+         // Add `-gdwarf-3` so that we always get the same output, regardless of
index 4be3024ea8f3b7097e79227aa0bc8cdc8efdd39a..119365af3fc6b687485c51b27f18892a6922f2c1 100644 (file)
@@ -13,19 +13,6 @@ just hardcode path in wrapper script.
 
 diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
 index b950cea..5ec8752 100755
---- a/src/etc/rust-gdb
-+++ b/src/etc/rust-gdb
-@@ -11,7 +11,7 @@ else
- fi
- # Find out where the pretty printer Python module is
--RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
-+RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)"
- GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
- # Run GDB with the additional arguments that load the pretty printers
-diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
-index 9744913..613737d 100755
 --- a/src/etc/rust-gdbgui
 +++ b/src/etc/rust-gdbgui
 @@ -40,7 +40,7 @@ else
@@ -35,5 +22,5 @@ index 9744913..613737d 100755
 -RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
 +RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)"
  GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
- # Set the environment variable `RUST_GDB` to overwrite the call to a
+ # Get the commit hash for path remapping
+ RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
index c848c82e16f9ed4b458382012ad232d03b5c7713..a8c6bb6d2b086ab572a5252d303cfd071c29daa2 100644 (file)
@@ -1,20 +1,14 @@
 # Patches for upstream
 
 # pending, or forwarded
-u-ignore-reproducible-failure.patch
 u-reproducible-build.patch
 u-ignore-endian-big-diff.patch
 u-fix-get-toml-when-test.patch
-u-fix-sysroot-detection-logic.patch
-
-# can be dropped once upstream updates rustix
-u-fix-rustix-for-sparc64.patch
 
 # not forwarded, or forwarded but unlikely to be merged
 u-ignore-ppc-hangs.patch
 u-rustc-llvm-cross-flags.patch
 u-reproducible-dl-stage0.patch
-u-make-tests-work-without-rpath.patch
 #u-allow-system-compiler-rt.patch
 
 # Debian-specific patches, not suitable for upstream
diff --git a/debian/patches/u-fix-rustix-for-sparc64.patch b/debian/patches/u-fix-rustix-for-sparc64.patch
deleted file mode 100644 (file)
index d0c636e..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/vendor/rustix/src/termios/constants.rs
-+++ b/vendor/rustix/src/termios/constants.rs
-@@ -33,6 +33,8 @@
- )))]
- pub use backend::termios::types::B1500000;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "freebsd",
-     target_os = "haiku",
-@@ -96,6 +98,8 @@
- )))]
- pub use backend::termios::types::B4000000;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "haiku",
-     target_os = "ios",
-@@ -104,6 +108,8 @@
- )))]
- pub use backend::termios::types::B460800;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "freebsd",
-     target_os = "haiku",
-@@ -116,6 +122,8 @@
- )))]
- pub use backend::termios::types::B500000;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "freebsd",
-     target_os = "haiku",
-@@ -732,6 +740,8 @@
-         )))]
-         backend::termios::types::B500000 => Some(500_000),
-         #[cfg(not(any(
-+            target_arch = "sparc",
-+            target_arch = "sparc64",
-             target_os = "dragonfly",
-             target_os = "freebsd",
-             target_os = "haiku",
-@@ -744,6 +754,8 @@
-         )))]
-         backend::termios::types::B576000 => Some(576_000),
-         #[cfg(not(any(
-+            target_arch = "sparc",
-+            target_arch = "sparc64",
-             target_os = "dragonfly",
-             target_os = "haiku",
-             target_os = "ios",
-@@ -752,6 +764,8 @@
-         )))]
-         backend::termios::types::B921600 => Some(921_600),
-         #[cfg(not(any(
-+            target_arch = "sparc",
-+            target_arch = "sparc64",
-             target_os = "dragonfly",
-             target_os = "freebsd",
-             target_os = "haiku",
---- a/vendor/rustix/src/termios/mod.rs
-+++ b/vendor/rustix/src/termios/mod.rs
-@@ -41,6 +41,8 @@
- )))]
- pub use constants::B1500000;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "freebsd",
-     target_os = "haiku",
-@@ -104,6 +106,8 @@
- )))]
- pub use constants::B4000000;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "haiku",
-     target_os = "ios",
-@@ -112,6 +116,8 @@
- )))]
- pub use constants::B460800;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "freebsd",
-     target_os = "haiku",
-@@ -124,6 +130,8 @@
- )))]
- pub use constants::B500000;
- #[cfg(not(any(
-+    target_arch = "sparc",
-+    target_arch = "sparc64",
-     target_os = "dragonfly",
-     target_os = "freebsd",
-     target_os = "haiku",
diff --git a/debian/patches/u-fix-sysroot-detection-logic.patch b/debian/patches/u-fix-sysroot-detection-logic.patch
deleted file mode 100644 (file)
index 64cc291..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-Description: Fix sysroot detection which would result in /usr/lib/lib/rustlib
- This patch is a mixture of two upstream fix attempts. The first from
- https://github.com/rust-lang/rust/pull/108376 didn't actually solve the
- problem in Debian's case. After reporting that in $Bug, a second attempt is
- made at https://github.com/rust-lang/rust/pull/110281, which worked.
-Bug: https://github.com/rust-lang/rust/issues/109994
---- a/compiler/rustc_session/src/filesearch.rs
-+++ b/compiler/rustc_session/src/filesearch.rs
-@@ -179,7 +179,7 @@
-         ))?;
-         // if `dir` points target's dir, move up to the sysroot
--        if dir.ends_with(crate::config::host_triple()) {
-+        let mut sysroot_dir = if dir.ends_with(crate::config::host_triple()) {
-             dir.parent() // chop off `$target`
-                 .and_then(|p| p.parent()) // chop off `rustlib`
-                 .and_then(|p| {
-@@ -194,13 +194,25 @@
-                     }
-                 })
-                 .map(|s| s.to_owned())
--                .ok_or(format!(
-+                .ok_or_else(|| format!(
-                     "Could not move 3 levels upper using `parent()` on {}",
-                     dir.display()
--                ))
-+                ))?
-         } else {
--            Ok(dir.to_owned())
-+            dir.to_owned()
-+        };
-+
-+        // On multiarch linux systems, there will be multiarch directory named
-+        // with the architecture(e.g `x86_64-linux-gnu`) under the `lib` directory.
-+        // Which cause us to mistakenly end up in the lib directory instead of the sysroot directory.
-+        if sysroot_dir.ends_with("lib") {
-+            sysroot_dir =
-+                sysroot_dir.parent().map(|real_sysroot| real_sysroot.to_owned()).ok_or_else(
-+                    || format!("Could not move to parent path of {}", sysroot_dir.display()),
-+                )?
-         }
-+
-+        Ok(sysroot_dir)
-     }
-     // Use env::args().next() to get the path of the executable without
diff --git a/debian/patches/u-ignore-reproducible-failure.patch b/debian/patches/u-ignore-reproducible-failure.patch
deleted file mode 100644 (file)
index 6ea1402..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
-Date: Thu, 14 Jul 2022 13:17:37 +0200
-Subject: u-ignore-reproducible-failure
-
-Bug: https://github.com/rust-lang/rust/issues/89911
----
- src/test/run-make-fulldeps/reproducible-build-2/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/run-make-fulldeps/reproducible-build-2/Makefile b/tests/run-make-fulldeps/reproducible-build-2/Makefile
-index fd94516..957e1f4 100644
---- a/tests/run-make-fulldeps/reproducible-build-2/Makefile
-+++ b/tests/run-make-fulldeps/reproducible-build-2/Makefile
-@@ -14,7 +14,7 @@ fat_lto:
-       $(RUSTC) reproducible-build.rs -C lto=fat
-       cp $(TMPDIR)/reproducible-build $(TMPDIR)/reproducible-build-a
-       $(RUSTC) reproducible-build.rs -C lto=fat
--      cmp "$(TMPDIR)/reproducible-build-a" "$(TMPDIR)/reproducible-build" || exit 1
-+      cmp "$(TMPDIR)/reproducible-build-a" "$(TMPDIR)/reproducible-build" || exit 0
- sysroot:
-       rm -rf $(TMPDIR) && mkdir $(TMPDIR)
diff --git a/debian/patches/u-make-tests-work-without-rpath.patch b/debian/patches/u-make-tests-work-without-rpath.patch
deleted file mode 100644 (file)
index edd2127..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Chris Coulson <chris.coulson@canonical.com>
-Date: Thu, 14 Jul 2022 13:17:38 +0200
-Subject: u-make-tests-work-without-rpath
-
-Forwarded: TODO
-
-===================================================================
----
- src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-index 1e267fb..ac46c24 100644
---- a/tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/tests/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,2 +1,6 @@
-+include ../tools.mk
-+
-+RUSTC := $(RUSTC_ORIGINAL)
-+
- all:
--      '$(PYTHON)' test.py
-+      $(HOST_RPATH_ENV) '$(PYTHON)' test.py