!79 Update to 1.67.1

From: @wk333 
Reviewed-by: @gitee-cmd 
Signed-off-by: @gitee-cmd
This commit is contained in:
openeuler-ci-bot 2023-03-01 09:55:46 +00:00 committed by Gitee
commit 628142f04f
10 changed files with 308 additions and 195 deletions

View File

@ -0,0 +1,55 @@
From ecf812777a260e35ec9cd0c7d9dbd17a3f5cf5f9 Mon Sep 17 00:00:00 2001
From: Arpad Borsos <swatinem@swatinem.de>
Date: Tue, 29 Nov 2022 23:17:08 +0100
Subject: [PATCH] Fix Async Generator ABI
This change was missed when making async generators implement `Future` directly.
It did not cause any problems in codegen so far, as `GeneratorState<(), Output>`
happens to have the same ABI as `Poll<Output>`.
---
compiler/rustc_ty_utils/src/abi.rs | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs
index 73c7eb6992f0..d644cbccea11 100644
--- a/compiler/rustc_ty_utils/src/abi.rs
+++ b/compiler/rustc_ty_utils/src/abi.rs
@@ -85,7 +85,7 @@ fn fn_sig_for_fn_abi<'tcx>(
bound_vars,
)
}
- ty::Generator(_, substs, _) => {
+ ty::Generator(did, substs, _) => {
let sig = substs.as_generator().poly_sig();
let bound_vars = tcx.mk_bound_variable_kinds(
@@ -104,10 +104,22 @@ fn fn_sig_for_fn_abi<'tcx>(
let env_ty = tcx.mk_adt(pin_adt_ref, pin_substs);
let sig = sig.skip_binder();
- let state_did = tcx.require_lang_item(LangItem::GeneratorState, None);
- let state_adt_ref = tcx.adt_def(state_did);
- let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]);
- let ret_ty = tcx.mk_adt(state_adt_ref, state_substs);
+ // The `FnSig` and the `ret_ty` here is for a generators main
+ // `Generator::resume(...) -> GeneratorState` function in case we
+ // have an ordinary generator, or the `Future::poll(...) -> Poll`
+ // function in case this is a special generator backing an async construct.
+ let ret_ty = if tcx.generator_is_async(did) {
+ let state_did = tcx.require_lang_item(LangItem::Poll, None);
+ let state_adt_ref = tcx.adt_def(state_did);
+ let state_substs = tcx.intern_substs(&[sig.return_ty.into()]);
+ tcx.mk_adt(state_adt_ref, state_substs)
+ } else {
+ let state_did = tcx.require_lang_item(LangItem::GeneratorState, None);
+ let state_adt_ref = tcx.adt_def(state_did);
+ let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]);
+ tcx.mk_adt(state_adt_ref, state_substs)
+ };
+
ty::Binder::bind_with_vars(
tcx.mk_fn_sig(
[env_ty, sig.resume_ty].iter(),
--
2.39.1

View File

@ -0,0 +1,26 @@
From 37cb177eb53145103ae72b67562884782dde01c3 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 528a84a8b37c..353d742161d1 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -89,8 +89,7 @@ macro_rules! args {
// 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()),
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
pre_link_args,
--
2.38.1

View File

@ -0,0 +1,25 @@
From 858187d679a7e7b959d93b96602337f0e16fb61b Mon Sep 17 00:00:00 2001
From: wk333 <13474090681@163.com>
Date: Tue, 14 Feb 2023 16:44:14 +0800
Subject: [PATCH 1/1] compile with llvm-15
---
src/bootstrap/configure.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index 6b139de..b6b9e22 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -340,7 +340,7 @@ for key in known_args:
set('build.rustc', value + '/bin/rustc')
set('build.cargo', value + '/bin/cargo')
elif option.name == 'llvm-root':
- set('target.{}.llvm-config'.format(build()), value + '/bin/llvm-config')
+ set('target.{}.llvm-config'.format(build()), value + '/lib64/llvm15/bin/llvm-config')
elif option.name == 'llvm-config':
set('target.{}.llvm-config'.format(build()), value)
elif option.name == 'llvm-filecheck':
--
2.27.0

101
rust.spec
View File

@ -1,9 +1,7 @@
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x %global bootstrap_rust 1.66.0
%{!?channel: %global channel stable} %global bootstrap_cargo 1.66.0
%global bootstrap_rust 1.59.0 %global bootstrap_channel 1.66.0
%global bootstrap_cargo 1.59.0 %global bootstrap_date 2022-12-15
%global bootstrap_channel 1.59.0
%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
@ -11,24 +9,26 @@
%bcond_without curl_http2 %bcond_without curl_http2
%bcond_without lldb %bcond_without lldb
Name: rust Name: rust
Version: 1.60.0 Version: 1.67.1
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
ExclusiveArch: %{rust_arches} Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.gz
%if "%{channel}" == "stable"
%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.65.0-disable-libssh2.patch
Patch0001: rustc-1.60.0-disable-http2.patch Patch0001: rustc-1.67.1-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
Patch0005: compile-with-llvm-15.patch
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
Patch0006: 0001-Use-lld-provided-by-system-for-wasm.patch
# Set a substitute-path in rust-gdb for standard library sources.
Patch0007: rustc-1.61.0-rust-gdb-substitute-path.patch
# https://github.com/rust-lang/rust/pull/105082
Patch0008: 0001-Fix-Async-Generator-ABI.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
@ -86,17 +86,17 @@ BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1.
BuildRequires: %{python} BuildRequires: %{python}
%if %with bundled_llvm %if %with bundled_llvm
BuildRequires: cmake3 >= 3.4.3 BuildRequires: cmake3 >= 3.4.3
Provides: bundled(llvm) = 11.0.1 Provides: bundled(llvm) = 15.0.7
%else %else
BuildRequires: cmake >= 2.8.11 BuildRequires: cmake >= 2.8.11
%if %defined llvm %if %defined llvm
%global llvm_root %{_libdir}/%{llvm} %global llvm_root %{_libdir}/%{llvm}
%else %else
%global llvm llvm %global llvm llvm15
%global llvm_root %{_prefix} %global llvm_root %{_prefix}
%endif %endif
BuildRequires: %{llvm} >= 12.0 BuildRequires: %{llvm} >= 13.0
BuildRequires: %{llvm}-devel >= 12.0 BuildRequires: %{llvm}-devel >= 13.0
%if %with llvm_static %if %with llvm_static
BuildRequires: %{llvm}-static libffi-devel BuildRequires: %{llvm}-static libffi-devel
%endif %endif
@ -178,21 +178,18 @@ Conflicts: rustfmt-preview < 1.0.0
%description -n rustfmt %description -n rustfmt
A tool for formatting Rust code according to style guidelines. A tool for formatting Rust code according to style guidelines.
%package -n rls %package analyzer
Summary: Rust Language Server for IDE integration Summary:Rust implementation of the Language Server Protocol
%if %with bundled_libgit2 Requires: %{name}-src
Provides: bundled(libgit2) = 1.1.0 # RLS is no longer available as of Rust 1.65, but we're including the stub
%endif # binary that implements LSP just enough to recommend rust-analyzer.
Requires: rust-analysis %{name}%{?_isa} = %{version}-%{release} Obsoletes: rls < 1.65.0~
Obsoletes: rls-preview < 1.31.6 Obsoletes: rls-preview < 1.31.6
Provides: rls-preview = %{version}-%{release}
Conflicts: rls-preview < 1.31.6
%description -n rls %description analyzer
The Rust Language Server provides a server that runs in the background, rust-analyzer is an implementation of Language Server Protocol for the Rust
providing IDEs, editors, and other tools with information about Rust programs. programming language. It provides features like completion and goto definition
It supports functionality such as 'goto definition', symbol search, for many code editors, including VS Code, Emacs and Vim.
reformatting, and code completion, and enables renaming and refactorings.
%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
@ -235,7 +232,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
@ -249,6 +246,10 @@ 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
%patch0008 -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/
@ -310,7 +311,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} \
@ -352,6 +353,10 @@ find %{buildroot}%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+'
mkdir -p %{buildroot}%{_datadir}/cargo/registry mkdir -p %{buildroot}%{_datadir}/cargo/registry
mkdir -p %{buildroot}%{_docdir}/cargo mkdir -p %{buildroot}%{_docdir}/cargo
ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html
# The rls stub doesn't have an install target, but we can just copy it.
%{__install} -t %{buildroot}%{_bindir} build/%{rust_triple}/stage2-tools-bin/rls
%if %without lldb %if %without lldb
rm -f %{buildroot}%{_bindir}/rust-lldb rm -f %{buildroot}%{_bindir}/rust-lldb
rm -f %{buildroot}%{rustlibdir}/etc/lldb_* rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
@ -363,7 +368,7 @@ export %{rust_env}
%{python} ./x.py test --no-fail-fast --stage 2 || : %{python} ./x.py test --no-fail-fast --stage 2 || :
%{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 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
@ -377,6 +382,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
@ -425,10 +431,11 @@ export %{rust_env}
%doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md %doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md
%license src/tools/rustfmt/LICENSE-{APACHE,MIT} %license src/tools/rustfmt/LICENSE-{APACHE,MIT}
%files -n rls %files analyzer
%{_bindir}/rls %{_bindir}/rls
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md} %{_bindir}/rust-analyzer
%license src/tools/rls/LICENSE-{APACHE,MIT} %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
@ -446,25 +453,19 @@ export %{rust_env}
%files help %files help
%dir %{_docdir}/%{name} %dir %{_docdir}/%{name}
%dir %{_docdir}/cargo
%dir %{_docdir}/%{name}/html
%docdir %{_docdir}/%{name} %docdir %{_docdir}/%{name}
%{_docdir}/%{name}/html
%dir %{_docdir}/cargo
%docdir %{_docdir}/cargo %docdir %{_docdir}/cargo
%{_docdir}/%{name}/html/*/
%{_docdir}/%{name}/html/*.html
%{_docdir}/%{name}/html/*.css
%{_docdir}/%{name}/html/*.js
%{_docdir}/%{name}/html/*.png
%{_docdir}/%{name}/html/*.svg
%{_docdir}/%{name}/html/*.woff
%{_docdir}/%{name}/html/*.woff2
%license %{_docdir}/%{name}/html/*.md
%{_docdir}/cargo/html %{_docdir}/cargo/html
%{_mandir}/man1/rustc.1* %{_mandir}/man1/rustc.1*
%{_mandir}/man1/rustdoc.1* %{_mandir}/man1/rustdoc.1*
%{_mandir}/man1/cargo*.1* %{_mandir}/man1/cargo*.1*
%changelog %changelog
* Tue Feb 28 2023 wangkai <wangkai385@h-partners.com> - 1.67.1-1
- Update to 1.67.1
* Tue Apr 19 2022 Liu Zixian <liuzixian4@huawei.com> - 1.60.0-1 * Tue Apr 19 2022 Liu Zixian <liuzixian4@huawei.com> - 1.60.0-1
- Update to 1.60.0 - Update to 1.60.0

View File

@ -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

View File

@ -1,59 +0,0 @@
From af470615d6ececcedbaf5edc4c34e18415a2cfa9 Mon Sep 17 00:00:00 2001
From: Liu Zixian <liuzixian4@huawei.com>
Date: Tue, 19 Apr 2022 22:26:47 +0800
Subject: [PATCH] disable libssh2
---
Cargo.lock | 15 ---------------
vendor/git2/Cargo.toml | 2 +-
2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index e3ab987b3..8baf4fbd9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1987,7 +1987,6 @@ checksum = "ddbd6021eef06fb289a8f54b3c2acfdd85ff2a585dfbb24b8576325373d2152c"
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2019,20 +2018,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "libssh2-sys"
-version = "0.2.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
[[package]]
name = "libz-sys"
version = "1.1.3"
diff --git a/vendor/git2/Cargo.toml b/vendor/git2/Cargo.toml
index 299b77a8d..a05099544 100644
--- a/vendor/git2/Cargo.toml
+++ b/vendor/git2/Cargo.toml
@@ -51,7 +51,7 @@ version = "3.3.0"
version = "0.1.39"
[features]
-default = ["ssh", "https", "ssh_key_from_memory"]
+default = ["https"]
https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"]
ssh = ["libgit2-sys/ssh"]
ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"]
--
2.35.1

Binary file not shown.

View 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" \
"$@"

View File

@ -0,0 +1,43 @@
--- rustc-beta-src/Cargo.lock.orig 2022-09-24 10:20:14.000000000 -0700
+++ rustc-beta-src/Cargo.lock 2022-10-04 10:26:35.490270607 -0700
@@ -1971,7 +1971,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2004,20 +2003,6 @@
]
[[package]]
-name = "libssh2-sys"
-version = "0.2.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/vendor/git2/Cargo.toml.orig 2022-10-04 10:26:35.490270607 -0700
+++ rustc-beta-src/vendor/git2/Cargo.toml 2022-10-04 10:28:14.002187686 -0700
@@ -58,9 +58,7 @@
[features]
default = [
- "ssh",
"https",
- "ssh_key_from_memory",
]
https = [
"libgit2-sys/https",

View File

@ -0,0 +1,90 @@
--- rustc-beta-src/Cargo.lock.orig 2023-01-24 13:25:47.822917185 -0800
+++ rustc-beta-src/Cargo.lock 2023-01-24 13:25:47.824917142 -0800
@@ -1062,7 +1062,6 @@
dependencies = [
"cc",
"libc",
- "libnghttp2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2181,16 +2180,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 = "libssh2-sys"
version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-01-24 13:25:47.824917142 -0800
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-01-24 13:26:29.209044200 -0800
@@ -21,7 +21,7 @@
cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" }
cargo-util = { path = "crates/cargo-util", version = "0.2.3" }
crates-io = { path = "crates/crates-io", version = "0.35.0" }
-curl = { version = "0.4.44", features = ["http2"] }
+curl = { version = "0.4.44", features = [] }
curl-sys = "0.4.59"
env_logger = "0.10.0"
pretty_env_logger = { version = "0.4", optional = true }
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-01-21 17:17:19.000000000 -0800
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-01-24 13:25:47.824917142 -0800
@@ -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);
}
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-01-21 17:17:19.000000000 -0800
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-01-24 13:25:47.824917142 -0800
@@ -223,16 +223,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()