Update to 1.70.0

This commit is contained in:
wk333 2023-06-21 09:57:29 +08:00
parent 9b8aaa61bc
commit 4b3d767c1b
8 changed files with 96 additions and 85 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
rustc-1.70.0-src.tar.xz filter=lfs diff=lfs merge=lfs -text

View File

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

View File

@ -1,27 +1,25 @@
%global bootstrap_rust 1.68.0 %global bootstrap_rust 1.69.0
%global bootstrap_cargo 1.68.0 %global bootstrap_cargo 1.69.0
%global bootstrap_channel 1.68.0 %global bootstrap_channel 1.69.0
%global bootstrap_date 2023-03-09 %global bootstrap_date 2023-04-20
%bcond_with llvm_static %bcond_with llvm_static
%bcond_with bundled_llvm %bcond_with bundled_llvm
%bcond_without bundled_libgit2 %bcond_without bundled_libgit2
%bcond_with disabled_libssh2 %bcond_with disabled_libssh2
%bcond_without curl_http2 %bcond_without curl_http2
%bcond_without lldb %bcond_without lldb
%ifnarch riscv64
%bcond_without analyzer %bcond_without analyzer
%endif
Name: rust Name: rust
Version: 1.69.0 Version: 1.70.0
Release: 2 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
Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.xz Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.xz
Patch0000: rustc-1.65.0-disable-libssh2.patch Patch0000: rustc-1.70.0-disable-libssh2.patch
Patch0001: rustc-1.69.0-disable-http2.patch Patch0001: rustc-1.70.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
@ -29,7 +27,7 @@ Patch0005: compile-with-llvm-15.patch
# By default, rust tries to use "rust-lld" as a linker for WebAssembly. # By default, rust tries to use "rust-lld" as a linker for WebAssembly.
Patch0006: 0001-Use-lld-provided-by-system-for-wasm.patch Patch0006: 0001-Use-lld-provided-by-system-for-wasm.patch
# Set a substitute-path in rust-gdb for standard library sources. # Set a substitute-path in rust-gdb for standard library sources.
Patch0007: rustc-1.61.0-rust-gdb-substitute-path.patch Patch0007: rustc-1.70.0-rust-gdb-substitute-path.patch
Patch0008: 0001-add-musl-root-riscv64gc-detection-in-configure.py.patch Patch0008: 0001-add-musl-root-riscv64gc-detection-in-configure.py.patch
%{lua: function rust_triple(arch) %{lua: function rust_triple(arch)
@ -94,8 +92,8 @@ BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1.
%global python python3 %global python python3
BuildRequires: %{python} BuildRequires: %{python}
%if %with bundled_llvm %if %with bundled_llvm
BuildRequires: cmake3 >= 3.4.3 BuildRequires: cmake3 >= 3.13.4
Provides: bundled(llvm) = 15.0.7 Provides: bundled(llvm) = 16.0.2
%else %else
BuildRequires: cmake >= 2.8.11 BuildRequires: cmake >= 2.8.11
%if %defined llvm %if %defined llvm
@ -251,7 +249,7 @@ test -f '%{local_rust_root}/bin/rustc'
%endif %endif
%if %without curl_http2 %if %without curl_http2
%patch0001 -p1 %patch0001 -p1
rm -rf vendor/libnghttp2-sys/ rm -rf vendor/libnghttp2-sys*/
%endif %endif
%if "%{python}" != "python3" %if "%{python}" != "python3"
sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
@ -266,18 +264,18 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
%patch0006 -p1 %patch0006 -p1
%patch0007 -p1 %patch0007 -p1
%patch0008 -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/libffi-sys*/libffi/
rm -rf vendor/libz-sys/src/zlib/ rm -rf vendor/libssh2-sys*/libssh2/
rm -rf vendor/libz-sys/src/zlib-ng/ rm -rf vendor/libz-sys*/src/zlib{,-ng}/
rm -rf vendor/lzma-sys/xz-*/ rm -rf vendor/lzma-sys*/xz-*/
rm -rf vendor/openssl-src/openssl/ rm -rf vendor/openssl-src*/openssl/
%if %without bundled_libgit2 %if %without bundled_libgit2
rm -rf vendor/libgit2-sys/libgit2/ rm -rf vendor/libgit2-sys*/libgit2/
%endif %endif
%if %with disabled_libssh2 %if %with disabled_libssh2
rm -rf vendor/libssh2-sys/ rm -rf vendor/libssh2-sys*/
%endif %endif
sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs
%if %{without bundled_llvm} && %{with llvm_static} %if %{without bundled_llvm} && %{with llvm_static}
@ -402,7 +400,9 @@ 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
%if %{with analyzer}
%{_libexecdir}/rust-analyzer-proc-macro-srv %{_libexecdir}/rust-analyzer-proc-macro-srv
%endif
%{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
@ -481,6 +481,10 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1* %{_mandir}/man1/cargo*.1*
%changelog %changelog
* Mon Jun 05 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.70.0-1
- Update to 1.70.0
- Fix rotten patch
* Mon Apr 24 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.69.0-2 * Mon Apr 24 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.69.0-2
- Add riscv64 specific changes - Add riscv64 specific changes

View File

@ -1,18 +0,0 @@
--- 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

@ -1,6 +1,6 @@
--- rustc-beta-src/Cargo.lock.orig 2023-03-23 17:10:30.810989345 -0700 --- rustc-beta-src/Cargo.lock.orig 2023-05-24 16:49:05.242510531 -0700
+++ rustc-beta-src/Cargo.lock 2023-03-23 17:10:30.812989303 -0700 +++ rustc-beta-src/Cargo.lock 2023-05-24 16:51:11.741865603 -0700
@@ -1142,7 +1142,6 @@ @@ -1197,7 +1197,6 @@ checksum = "14d05c10f541ae6f3bc5b3d923c2
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",
@ -8,7 +8,7 @@
"libz-sys", "libz-sys",
"openssl-sys", "openssl-sys",
"pkg-config", "pkg-config",
@@ -2375,16 +2374,6 @@ @@ -2989,16 +2988,6 @@ source = "registry+https://github.com/ru
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
[[package]] [[package]]
@ -25,20 +25,20 @@
name = "libz-sys" name = "libz-sys"
version = "1.1.3" version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-03-23 17:10:30.812989303 -0700 --- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-05-24 16:49:05.244510489 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-23 17:11:26.242836664 -0700 +++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-05-24 16:51:04.683013189 -0700
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@ cargo-platform = { path = "crates/cargo-
cargo-util = { path = "crates/cargo-util", version = "0.2.3" } cargo-util = { path = "crates/cargo-util", version = "0.2.4" }
clap = "4.1.3" clap = "4.2.0"
crates-io = { path = "crates/crates-io", version = "0.36.0" } crates-io = { path = "crates/crates-io", version = "0.36.0" }
-curl = { version = "0.4.44", features = ["http2"] } -curl = { version = "0.4.44", features = ["http2"] }
+curl = { version = "0.4.44", features = [] } +curl = { version = "0.4.44", features = [] }
curl-sys = "0.4.59" curl-sys = "0.4.61"
env_logger = "0.10.0" env_logger = "0.10.0"
filetime = "0.2.9" filetime = "0.2.9"
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-03-19 00:20:55.000000000 -0700 --- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-23 17:10:30.812989303 -0700 +++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-05-24 16:49:05.244510489 -0700
@@ -401,16 +401,9 @@ @@ -407,16 +407,9 @@ impl<'cfg> PackageSet<'cfg> {
sources: SourceMap<'cfg>, sources: SourceMap<'cfg>,
config: &'cfg Config, config: &'cfg Config,
) -> CargoResult<PackageSet<'cfg>> { ) -> CargoResult<PackageSet<'cfg>> {
@ -58,9 +58,9 @@
Ok(PackageSet { Ok(PackageSet {
packages: package_ids packages: package_ids
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-03-19 00:20:55.000000000 -0700 --- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-05-24 16:49:05.245510468 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-03-23 17:10:30.813989282 -0700 +++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-05-24 16:51:57.916900146 -0700
@@ -220,16 +220,8 @@ @@ -229,16 +229,8 @@ impl<'cfg> HttpRegistry<'cfg> {
} }
self.fetch_started = true; self.fetch_started = true;
@ -77,11 +77,11 @@
+ // Multiplexing is disabled because the system libcurl doesn't support it. + // Multiplexing is disabled because the system libcurl doesn't support it.
+ self.multiplexing = false; + self.multiplexing = false;
self.config if !self.quiet {
.shell() self.config
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs.orig 2023-03-19 00:20:55.000000000 -0700 --- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs 2023-03-23 17:10:30.813989282 -0700 +++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-05-24 16:49:05.245510468 -0700
@@ -116,7 +116,7 @@ @@ -25,7 +25,7 @@ impl<T> PollExt<T> for Poll<T> {
macro_rules! try_old_curl { macro_rules! try_old_curl {
($e:expr, $msg:expr) => { ($e:expr, $msg:expr) => {
let result = $e; let result = $e;

View File

@ -1,6 +1,6 @@
--- rustc-beta-src/Cargo.lock.orig 2022-09-24 10:20:14.000000000 -0700 --- rustc-beta-src/Cargo.lock.orig 2023-05-19 19:02:31.000000000 -0700
+++ rustc-beta-src/Cargo.lock 2022-10-04 10:26:35.490270607 -0700 +++ rustc-beta-src/Cargo.lock 2023-05-24 16:36:33.312232441 -0700
@@ -1971,7 +1971,6 @@ @@ -2967,7 +2967,6 @@
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",
@ -8,14 +8,14 @@
"libz-sys", "libz-sys",
"openssl-sys", "openssl-sys",
"pkg-config", "pkg-config",
@@ -2004,20 +2003,6 @@ @@ -3000,20 +2999,6 @@
] ]
[[package]] [[package]]
-name = "libssh2-sys" -name = "libssh2-sys"
-version = "0.2.23" -version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index" -source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
-dependencies = [ -dependencies = [
- "cc", - "cc",
- "libc", - "libc",
@ -29,9 +29,9 @@
name = "libz-sys" name = "libz-sys"
version = "1.1.3" version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" 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.orig 2023-05-19 21:16:57.000000000 -0700
+++ rustc-beta-src/vendor/git2/Cargo.toml 2022-10-04 10:28:14.002187686 -0700 +++ rustc-beta-src/vendor/git2/Cargo.toml 2023-05-24 16:33:42.043813439 -0700
@@ -58,9 +58,7 @@ @@ -55,9 +55,7 @@
[features] [features]
default = [ default = [

View File

@ -0,0 +1,21 @@
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index 9abed30ea6f7..e4bf55df3688 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -13,8 +13,6 @@ fi
# Find out where the pretty printer Python module is
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-# Get the commit hash for path remapping
-RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
# Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `RUST_GDB` to overwrite the call to a
@@ -23,6 +21,6 @@ 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 /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \
+ -iex "set substitute-path @BUILDDIR@ $RUSTC_SYSROOT/lib/rustlib/src/rust" \
"$@"

3
rustc-1.70.0-src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb8e9c564566b2d3228d95de9063a9254182446a161353f1d843bfbaf5c34639
size 140736896