!86 Update to 1.64.0
From: @wk333 Reviewed-by: @jingxiaolu Signed-off-by: @jingxiaolu
This commit is contained in:
commit
4fc5bb1f00
26
0001-Use-lld-provided-by-system-for-wasm.patch
Normal file
26
0001-Use-lld-provided-by-system-for-wasm.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From b521511174b1a08dddfac243604d649b71cc7386 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ivan Mironov <mironov.ivan@gmail.com>
|
||||||
|
Date: Sun, 8 Dec 2019 17:23:08 +0500
|
||||||
|
Subject: [PATCH] Use lld provided by system for wasm
|
||||||
|
|
||||||
|
---
|
||||||
|
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
index de7b7374af31..eebbe616e9b6 100644
|
||||||
|
--- a/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
@@ -99,8 +99,7 @@ pub fn options() -> TargetOptions {
|
||||||
|
// arguments just yet
|
||||||
|
limit_rdylib_exports: false,
|
||||||
|
|
||||||
|
- // we use the LLD shipped with the Rust toolchain by default
|
||||||
|
- linker: Some("rust-lld".into()),
|
||||||
|
+ linker: Some("lld".into()),
|
||||||
|
lld_flavor: LldFlavor::Wasm,
|
||||||
|
linker_is_gnu: false,
|
||||||
|
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
||||||
53
0001-rustc_transmute-fix-big-endian-discriminants.patch
Normal file
53
0001-rustc_transmute-fix-big-endian-discriminants.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 2946828fcb8e2e68a16839dfcf4319bf119f8acd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Stone <jistone@redhat.com>
|
||||||
|
Date: Tue, 20 Sep 2022 13:03:43 -0700
|
||||||
|
Subject: [PATCH] rustc_transmute: fix big-endian discriminants
|
||||||
|
|
||||||
|
(cherry picked from commit a72666ed56ec5f1b6d254c7020cf86143edc6dbd)
|
||||||
|
---
|
||||||
|
compiler/rustc_transmute/src/layout/tree.rs | 22 +++++++++++++++------
|
||||||
|
1 file changed, 16 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs
|
||||||
|
index 70b3ba02b05b..e4fcde35ed37 100644
|
||||||
|
--- a/compiler/rustc_transmute/src/layout/tree.rs
|
||||||
|
+++ b/compiler/rustc_transmute/src/layout/tree.rs
|
||||||
|
@@ -402,7 +402,7 @@ fn from_repr_c_variant(
|
||||||
|
.unwrap();
|
||||||
|
tracing::trace!(?discr_layout, "computed discriminant layout");
|
||||||
|
variant_layout = variant_layout.extend(discr_layout).unwrap().0;
|
||||||
|
- tree = tree.then(Self::from_disr(discr, tcx, layout_summary.discriminant_size));
|
||||||
|
+ tree = tree.then(Self::from_discr(discr, tcx, layout_summary.discriminant_size));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next come fields.
|
||||||
|
@@ -442,11 +442,21 @@ fn from_repr_c_variant(
|
||||||
|
Ok(tree)
|
||||||
|
}
|
||||||
|
|
||||||
|
- pub fn from_disr(discr: Discr<'tcx>, tcx: TyCtxt<'tcx>, size: usize) -> Self {
|
||||||
|
- // FIXME(@jswrenn): I'm certain this is missing needed endian nuance.
|
||||||
|
- let bytes = discr.val.to_ne_bytes();
|
||||||
|
- let bytes = &bytes[..size];
|
||||||
|
- Self::Seq(bytes.into_iter().copied().map(|b| Self::from_bits(b)).collect())
|
||||||
|
+ pub fn from_discr(discr: Discr<'tcx>, tcx: TyCtxt<'tcx>, size: usize) -> Self {
|
||||||
|
+ use rustc_target::abi::Endian;
|
||||||
|
+
|
||||||
|
+ let bytes: [u8; 16];
|
||||||
|
+ let bytes = match tcx.data_layout.endian {
|
||||||
|
+ Endian::Little => {
|
||||||
|
+ bytes = discr.val.to_le_bytes();
|
||||||
|
+ &bytes[..size]
|
||||||
|
+ }
|
||||||
|
+ Endian::Big => {
|
||||||
|
+ bytes = discr.val.to_be_bytes();
|
||||||
|
+ &bytes[bytes.len() - size..]
|
||||||
|
+ }
|
||||||
|
+ };
|
||||||
|
+ Self::Seq(bytes.iter().map(|&b| Self::from_bits(b)).collect())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
||||||
61
rust.spec
61
rust.spec
@ -1,8 +1,7 @@
|
|||||||
%{!?channel: %global channel stable}
|
%global bootstrap_rust 1.63.0
|
||||||
%global bootstrap_rust 1.59.0
|
%global bootstrap_cargo 1.63.0
|
||||||
%global bootstrap_cargo 1.59.0
|
%global bootstrap_channel 1.63.0
|
||||||
%global bootstrap_channel 1.59.0
|
%global bootstrap_date 2022-08-11
|
||||||
%global bootstrap_date 2022-04-19
|
|
||||||
%bcond_with llvm_static
|
%bcond_with llvm_static
|
||||||
%bcond_with bundled_llvm
|
%bcond_with bundled_llvm
|
||||||
%bcond_without bundled_libgit2
|
%bcond_without bundled_libgit2
|
||||||
@ -10,23 +9,25 @@
|
|||||||
%bcond_without curl_http2
|
%bcond_without curl_http2
|
||||||
%bcond_without lldb
|
%bcond_without lldb
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.60.0
|
Version: 1.64.0
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||||
URL: https://www.rust-lang.org
|
URL: https://www.rust-lang.org
|
||||||
%if "%{channel}" == "stable"
|
Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.xz
|
||||||
%global rustc_package rustc-%{version}-src
|
|
||||||
%else
|
|
||||||
%global rustc_package rustc-%{channel}-src
|
|
||||||
%endif
|
|
||||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.gz
|
|
||||||
|
|
||||||
Patch0000: rustc-1.60.0-disable-libssh2.patch
|
Patch0000: rustc-1.60.0-disable-libssh2.patch
|
||||||
Patch0001: rustc-1.60.0-disable-http2.patch
|
Patch0001: rustc-1.63.0-disable-http2.patch
|
||||||
Patch0002: clippy-driver-usage-should-user-friendly.patch
|
Patch0002: clippy-driver-usage-should-user-friendly.patch
|
||||||
Patch0003: cargo-help-clippy-should-have-description-to-user.patch
|
Patch0003: cargo-help-clippy-should-have-description-to-user.patch
|
||||||
Patch0004: fix-a-println-wrong-format.patch
|
Patch0004: fix-a-println-wrong-format.patch
|
||||||
|
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
|
||||||
|
Patch0005: 0001-Use-lld-provided-by-system-for-wasm.patch
|
||||||
|
# Set a substitute-path in rust-gdb for standard library sources.
|
||||||
|
Patch0006: rustc-1.61.0-rust-gdb-substitute-path.patch
|
||||||
|
# https://github.com/rust-lang/rust/pull/102076
|
||||||
|
Patch0007: 0001-rustc_transmute-fix-big-endian-discriminants.patch
|
||||||
|
|
||||||
%{lua: function rust_triple(arch)
|
%{lua: function rust_triple(arch)
|
||||||
local abi = "gnu"
|
local abi = "gnu"
|
||||||
if arch == "armv7hl" then
|
if arch == "armv7hl" then
|
||||||
@ -100,7 +101,7 @@ BuildRequires: %{llvm}-static libffi-devel
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: procps-ng
|
BuildRequires: procps-ng
|
||||||
BuildRequires: ninja-build
|
BuildRequires: ninja-build libstdc++-static
|
||||||
Provides: rustc = %{version}-%{release}
|
Provides: rustc = %{version}-%{release}
|
||||||
Provides: rustc%{?_isa} = %{version}-%{release}
|
Provides: rustc%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
||||||
@ -177,7 +178,7 @@ Conflicts: rustfmt-preview < 1.0.0
|
|||||||
A tool for formatting Rust code according to style guidelines.
|
A tool for formatting Rust code according to style guidelines.
|
||||||
|
|
||||||
%package -n rls
|
%package -n rls
|
||||||
Summary: Rust Language Server for IDE integration
|
Summary: Rust Language Server for IDE integration (deprecated)
|
||||||
%if %with bundled_libgit2
|
%if %with bundled_libgit2
|
||||||
Provides: bundled(libgit2) = 1.1.0
|
Provides: bundled(libgit2) = 1.1.0
|
||||||
%endif
|
%endif
|
||||||
@ -189,8 +190,16 @@ Conflicts: rls-preview < 1.31.6
|
|||||||
%description -n rls
|
%description -n rls
|
||||||
The Rust Language Server provides a server that runs in the background,
|
The Rust Language Server provides a server that runs in the background,
|
||||||
providing IDEs, editors, and other tools with information about Rust programs.
|
providing IDEs, editors, and other tools with information about Rust programs.
|
||||||
It supports functionality such as 'goto definition', symbol search,
|
RLS is being deprecated in favor of rust-analyzer, and may be removed in the future.
|
||||||
reformatting, and code completion, and enables renaming and refactorings.
|
https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html
|
||||||
|
|
||||||
|
%package analyzer
|
||||||
|
Summary: Rust implementation of the Language Server Protocol
|
||||||
|
|
||||||
|
%description analyzer
|
||||||
|
rust-analyzer is an implementation of Language Server Protocol for the Rust
|
||||||
|
programming language. It provides features like completion and goto definition
|
||||||
|
for many code editors, including VS Code, Emacs and Vim.
|
||||||
|
|
||||||
%package -n clippy
|
%package -n clippy
|
||||||
Summary: Lints to catch common mistakes and improve your Rust code
|
Summary: Lints to catch common mistakes and improve your Rust code
|
||||||
@ -233,7 +242,7 @@ Man pages and other related help documents for rust.
|
|||||||
test -f '%{local_rust_root}/bin/cargo'
|
test -f '%{local_rust_root}/bin/cargo'
|
||||||
test -f '%{local_rust_root}/bin/rustc'
|
test -f '%{local_rust_root}/bin/rustc'
|
||||||
%endif
|
%endif
|
||||||
%setup -q -n %{rustc_package}
|
%setup -q -n rustc-%{version}-src
|
||||||
%if %with disabled_libssh2
|
%if %with disabled_libssh2
|
||||||
%patch0000 -p1
|
%patch0000 -p1
|
||||||
%endif
|
%endif
|
||||||
@ -247,6 +256,9 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
|
|||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
%patch0003 -p1
|
%patch0003 -p1
|
||||||
%patch0004 -p1
|
%patch0004 -p1
|
||||||
|
%patch0005 -p1
|
||||||
|
%patch0006 -p1
|
||||||
|
%patch0007 -p1
|
||||||
rm -rf vendor/curl-sys/curl/
|
rm -rf vendor/curl-sys/curl/
|
||||||
rm -rf vendor/jemalloc-sys/jemalloc/
|
rm -rf vendor/jemalloc-sys/jemalloc/
|
||||||
rm -rf vendor/libssh2-sys/libssh2/
|
rm -rf vendor/libssh2-sys/libssh2/
|
||||||
@ -308,7 +320,7 @@ fi
|
|||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
%{enable_debuginfo} \
|
%{enable_debuginfo} \
|
||||||
--enable-extended \
|
--enable-extended \
|
||||||
--tools=analysis,cargo,clippy,rls,rustfmt,src \
|
--tools=analysis,cargo,clippy,rls,rust-analyzer,rustfmt,src \
|
||||||
--enable-vendor \
|
--enable-vendor \
|
||||||
--enable-verbose-tests \
|
--enable-verbose-tests \
|
||||||
%{?codegen_units_std} \
|
%{?codegen_units_std} \
|
||||||
@ -362,6 +374,7 @@ export %{rust_env}
|
|||||||
%{python} ./x.py test --no-fail-fast --stage 2 cargo || :
|
%{python} ./x.py test --no-fail-fast --stage 2 cargo || :
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 clippy || :
|
%{python} ./x.py test --no-fail-fast --stage 2 clippy || :
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 rls || :
|
%{python} ./x.py test --no-fail-fast --stage 2 rls || :
|
||||||
|
%{python} ./x.py test --no-fail-fast --stage 2 rust-analyzer || :
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || :
|
%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || :
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
@ -375,6 +388,7 @@ export %{rust_env}
|
|||||||
%dir %{rustlibdir}
|
%dir %{rustlibdir}
|
||||||
%dir %{rustlibdir}/%{rust_triple}
|
%dir %{rustlibdir}/%{rust_triple}
|
||||||
%dir %{rustlibdir}/%{rust_triple}/lib
|
%dir %{rustlibdir}/%{rust_triple}/lib
|
||||||
|
%{_libexecdir}/rust-analyzer-proc-macro-srv
|
||||||
%{rustlibdir}/%{rust_triple}/lib/*.so
|
%{rustlibdir}/%{rust_triple}/lib/*.so
|
||||||
%dir %{rustlibdir}/%{rust_musl_triple}
|
%dir %{rustlibdir}/%{rust_musl_triple}
|
||||||
%dir %{rustlibdir}/%{rust_musl_triple}/lib
|
%dir %{rustlibdir}/%{rust_musl_triple}/lib
|
||||||
@ -428,6 +442,11 @@ export %{rust_env}
|
|||||||
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
|
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
|
||||||
%license src/tools/rls/LICENSE-{APACHE,MIT}
|
%license src/tools/rls/LICENSE-{APACHE,MIT}
|
||||||
|
|
||||||
|
%files analyzer
|
||||||
|
%{_bindir}/rust-analyzer
|
||||||
|
%doc src/tools/rust-analyzer/README.md
|
||||||
|
%license src/tools/rust-analyzer/LICENSE-{APACHE,MIT}
|
||||||
|
|
||||||
%files -n clippy
|
%files -n clippy
|
||||||
%{_bindir}/cargo-clippy
|
%{_bindir}/cargo-clippy
|
||||||
%{_bindir}/clippy-driver
|
%{_bindir}/clippy-driver
|
||||||
@ -454,7 +473,6 @@ export %{rust_env}
|
|||||||
%{_docdir}/%{name}/html/*.js
|
%{_docdir}/%{name}/html/*.js
|
||||||
%{_docdir}/%{name}/html/*.png
|
%{_docdir}/%{name}/html/*.png
|
||||||
%{_docdir}/%{name}/html/*.svg
|
%{_docdir}/%{name}/html/*.svg
|
||||||
%{_docdir}/%{name}/html/*.woff
|
|
||||||
%{_docdir}/%{name}/html/*.woff2
|
%{_docdir}/%{name}/html/*.woff2
|
||||||
%license %{_docdir}/%{name}/html/*.md
|
%license %{_docdir}/%{name}/html/*.md
|
||||||
%{_docdir}/cargo/html
|
%{_docdir}/cargo/html
|
||||||
@ -463,6 +481,9 @@ export %{rust_env}
|
|||||||
%{_mandir}/man1/cargo*.1*
|
%{_mandir}/man1/cargo*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 11 2023 wangkai <13474090681@163.com> - 1.64.0-1
|
||||||
|
- Update to 1.64.0
|
||||||
|
|
||||||
* Tue Nov 01 2022 wangkai <wangkai385@h-partners.com> - 1.60.0-1
|
* Tue Nov 01 2022 wangkai <wangkai385@h-partners.com> - 1.60.0-1
|
||||||
- Update to 1.60.0
|
- Update to 1.60.0
|
||||||
|
|
||||||
|
|||||||
@ -1,86 +0,0 @@
|
|||||||
From 9669318f57818f7ae497ef2bdedcd635298e2ce4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Liu Zixian <liuzixian4@huawei.com>
|
|
||||||
Date: Tue, 19 Apr 2022 22:28:00 +0800
|
|
||||||
Subject: [PATCH] disable http2
|
|
||||||
|
|
||||||
---
|
|
||||||
Cargo.lock | 11 -----------
|
|
||||||
src/tools/cargo/Cargo.toml | 2 +-
|
|
||||||
src/tools/cargo/src/cargo/core/package.rs | 12 +++---------
|
|
||||||
3 files changed, 4 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Cargo.lock b/Cargo.lock
|
|
||||||
index 8baf4fbd9..79740b777 100644
|
|
||||||
--- a/Cargo.lock
|
|
||||||
+++ b/Cargo.lock
|
|
||||||
@@ -958,7 +958,6 @@ checksum = "d130987e6a6a34fe0889e1083022fa48cd90e6709a84be3fb8dd95801de5af20"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"libc",
|
|
||||||
- "libnghttp2-sys",
|
|
||||||
"libz-sys",
|
|
||||||
"openssl-sys",
|
|
||||||
"pkg-config",
|
|
||||||
@@ -2008,16 +2007,6 @@ version = "0.1.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
|
||||||
|
|
||||||
-[[package]]
|
|
||||||
-name = "libnghttp2-sys"
|
|
||||||
-version = "0.1.4+1.41.0"
|
|
||||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
|
|
||||||
-dependencies = [
|
|
||||||
- "cc",
|
|
||||||
- "libc",
|
|
||||||
-]
|
|
||||||
-
|
|
||||||
[[package]]
|
|
||||||
name = "libz-sys"
|
|
||||||
version = "1.1.3"
|
|
||||||
diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml
|
|
||||||
index fba5257a8..9fe466d6d 100644
|
|
||||||
--- a/src/tools/cargo/Cargo.toml
|
|
||||||
+++ b/src/tools/cargo/Cargo.toml
|
|
||||||
@@ -22,7 +22,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" }
|
|
||||||
cargo-util = { path = "crates/cargo-util", version = "0.1.2" }
|
|
||||||
crates-io = { path = "crates/crates-io", version = "0.34.0" }
|
|
||||||
crossbeam-utils = "0.8"
|
|
||||||
-curl = { version = "0.4.41", features = ["http2"] }
|
|
||||||
+curl = { version = "0.4.41", features = [] }
|
|
||||||
curl-sys = "0.4.50"
|
|
||||||
env_logger = "0.9.0"
|
|
||||||
pretty_env_logger = { version = "0.4", optional = true }
|
|
||||||
diff --git a/src/tools/cargo/src/cargo/core/package.rs b/src/tools/cargo/src/cargo/core/package.rs
|
|
||||||
index 0ebe0277e..1b3fc1ee1 100644
|
|
||||||
--- a/src/tools/cargo/src/cargo/core/package.rs
|
|
||||||
+++ b/src/tools/cargo/src/cargo/core/package.rs
|
|
||||||
@@ -412,14 +412,8 @@ impl<'cfg> PackageSet<'cfg> {
|
|
||||||
// Also note that pipelining is disabled as curl authors have indicated
|
|
||||||
// that it's buggy, and we've empirically seen that it's buggy with HTTP
|
|
||||||
// proxies.
|
|
||||||
- let mut multi = Multi::new();
|
|
||||||
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
|
|
||||||
- multi
|
|
||||||
- .pipelining(false, multiplexing)
|
|
||||||
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
|
||||||
-
|
|
||||||
- // let's not flood crates.io with connections
|
|
||||||
- multi.set_max_host_connections(2)?;
|
|
||||||
+ let multi = Multi::new();
|
|
||||||
+ let multiplexing = false;
|
|
||||||
|
|
||||||
Ok(PackageSet {
|
|
||||||
packages: package_ids
|
|
||||||
@@ -648,7 +642,7 @@ impl<'cfg> PackageSet<'cfg> {
|
|
||||||
macro_rules! try_old_curl {
|
|
||||||
($e:expr, $msg:expr) => {
|
|
||||||
let result = $e;
|
|
||||||
- if cfg!(target_os = "macos") {
|
|
||||||
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
|
|
||||||
if let Err(e) = result {
|
|
||||||
warn!("ignoring libcurl {} error: {}", $msg, e);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
||||||
18
rustc-1.61.0-rust-gdb-substitute-path.patch
Normal file
18
rustc-1.61.0-rust-gdb-substitute-path.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- rustc-1.61.0-src/src/etc/rust-gdb.orig 2022-05-17 18:29:36.000000000 -0700
|
||||||
|
+++ rustc-1.61.0-src/src/etc/rust-gdb 2022-05-18 11:18:13.732709661 -0700
|
||||||
|
@@ -14,6 +14,9 @@ fi
|
||||||
|
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
|
||||||
|
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
|
||||||
|
|
||||||
|
+RUST_STD_BUILD="@BUILDDIR@/library/"
|
||||||
|
+RUST_STD_SRC="$RUSTC_SYSROOT/lib/rustlib/src/rust/library/"
|
||||||
|
+
|
||||||
|
# Run GDB with the additional arguments that load the pretty printers
|
||||||
|
# Set the environment variable `RUST_GDB` to overwrite the call to a
|
||||||
|
# different/specific command (defaults to `gdb`).
|
||||||
|
@@ -21,4 +24,5 @@ RUST_GDB="${RUST_GDB:-gdb}"
|
||||||
|
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
|
||||||
|
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \
|
||||||
|
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
|
||||||
|
+ -iex "set substitute-path $RUST_STD_BUILD $RUST_STD_SRC" \
|
||||||
|
"$@"
|
||||||
90
rustc-1.63.0-disable-http2.patch
Normal file
90
rustc-1.63.0-disable-http2.patch
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
--- rustc-1.63.0-src/Cargo.lock.orig 2022-08-10 12:25:16.512185135 -0700
|
||||||
|
+++ rustc-1.63.0-src/Cargo.lock 2022-08-10 12:25:16.513185114 -0700
|
||||||
|
@@ -1054,7 +1054,6 @@
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
- "libnghttp2-sys",
|
||||||
|
"libz-sys",
|
||||||
|
"openssl-sys",
|
||||||
|
"pkg-config",
|
||||||
|
@@ -2160,16 +2159,6 @@
|
||||||
|
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
-name = "libnghttp2-sys"
|
||||||
|
-version = "0.1.4+1.41.0"
|
||||||
|
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
|
||||||
|
-dependencies = [
|
||||||
|
- "cc",
|
||||||
|
- "libc",
|
||||||
|
-]
|
||||||
|
-
|
||||||
|
-[[package]]
|
||||||
|
name = "libz-sys"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
--- rustc-1.63.0-src/src/tools/cargo/Cargo.toml.orig 2022-08-10 12:25:16.514185093 -0700
|
||||||
|
+++ rustc-1.63.0-src/src/tools/cargo/Cargo.toml 2022-08-10 12:25:51.441455282 -0700
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
cargo-util = { path = "crates/cargo-util", version = "0.2.1" }
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.34.0" }
|
||||||
|
crossbeam-utils = "0.8"
|
||||||
|
-curl = { version = "0.4.43", features = ["http2"] }
|
||||||
|
+curl = { version = "0.4.43", features = [] }
|
||||||
|
curl-sys = "0.4.55"
|
||||||
|
env_logger = "0.9.0"
|
||||||
|
pretty_env_logger = { version = "0.4", optional = true }
|
||||||
|
--- rustc-1.63.0-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2022-08-08 15:47:35.000000000 -0700
|
||||||
|
+++ rustc-1.63.0-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2022-08-10 12:25:16.514185093 -0700
|
||||||
|
@@ -192,16 +192,8 @@
|
||||||
|
}
|
||||||
|
self.fetch_started = true;
|
||||||
|
|
||||||
|
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
|
||||||
|
- // failures here as fatal as it would indicate a build-time problem.
|
||||||
|
- self.multiplexing = self.config.http_config()?.multiplexing.unwrap_or(true);
|
||||||
|
-
|
||||||
|
- self.multi
|
||||||
|
- .pipelining(false, self.multiplexing)
|
||||||
|
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
||||||
|
-
|
||||||
|
- // let's not flood the server with connections
|
||||||
|
- self.multi.set_max_host_connections(2)?;
|
||||||
|
+ // Multiplexing is disabled because the system libcurl doesn't support it.
|
||||||
|
+ self.multiplexing = false;
|
||||||
|
|
||||||
|
self.config
|
||||||
|
.shell()
|
||||||
|
--- rustc-1.63.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2022-08-08 15:47:35.000000000 -0700
|
||||||
|
+++ rustc-1.63.0-src/src/tools/cargo/src/cargo/core/package.rs 2022-08-10 12:25:16.514185093 -0700
|
||||||
|
@@ -403,16 +403,9 @@
|
||||||
|
sources: SourceMap<'cfg>,
|
||||||
|
config: &'cfg Config,
|
||||||
|
) -> CargoResult<PackageSet<'cfg>> {
|
||||||
|
- // We've enabled the `http2` feature of `curl` in Cargo, so treat
|
||||||
|
- // failures here as fatal as it would indicate a build-time problem.
|
||||||
|
- let mut multi = Multi::new();
|
||||||
|
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
|
||||||
|
- multi
|
||||||
|
- .pipelining(false, multiplexing)
|
||||||
|
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
||||||
|
-
|
||||||
|
- // let's not flood crates.io with connections
|
||||||
|
- multi.set_max_host_connections(2)?;
|
||||||
|
+ // Multiplexing is disabled because the system libcurl doesn't support it.
|
||||||
|
+ let multi = Multi::new();
|
||||||
|
+ let multiplexing = false;
|
||||||
|
|
||||||
|
Ok(PackageSet {
|
||||||
|
packages: package_ids
|
||||||
|
@@ -658,7 +651,7 @@
|
||||||
|
macro_rules! try_old_curl {
|
||||||
|
($e:expr, $msg:expr) => {
|
||||||
|
let result = $e;
|
||||||
|
- if cfg!(target_os = "macos") {
|
||||||
|
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
|
||||||
|
if let Err(e) = result {
|
||||||
|
warn!("ignoring libcurl {} error: {}", $msg, e);
|
||||||
|
}
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user