From 225865746cd5dc7b53d45eea13f502ddad8cb38d Mon Sep 17 00:00:00 2001 From: J-ZhengLi Date: Wed, 9 Feb 2022 14:36:00 +0800 Subject: [PATCH 1/3] fix build error caused by deadcode --- emit-bootstrap-lib-deadcode-warning.patch | 10 ++++++++++ rust.spec | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 emit-bootstrap-lib-deadcode-warning.patch diff --git a/emit-bootstrap-lib-deadcode-warning.patch b/emit-bootstrap-lib-deadcode-warning.patch new file mode 100644 index 0000000..2d7e00c --- /dev/null +++ b/emit-bootstrap-lib-deadcode-warning.patch @@ -0,0 +1,10 @@ +--- a/src/bootstrap/lib.rs ++++ a/src/bootstrap/lib.rs +@@ -273,6 +273,7 @@ + RefCell)>>>, + } + ++#[allow(dead_code)] + #[derive(Debug)] + struct Crate { + name: Interned, diff --git a/rust.spec b/rust.spec index 3c06d59..3529f3e 100644 --- a/rust.spec +++ b/rust.spec @@ -12,7 +12,7 @@ %bcond_without lldb Name: rust Version: 1.57.0 -Release: 1 +Release: 2 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) URL: https://www.rust-lang.org @@ -29,6 +29,7 @@ Patch0001: rustc-1.56.0-disable-http2.patch Patch0002: clippy-driver-usage-should-user-friendly.patch Patch0003: cargo-help-clippy-should-have-description-to-user.patch Patch0004: fix-a-println-wrong-format.patch +Patch0005: emit-bootstrap-lib-deadcode-warning.patch %{lua: function rust_triple(arch) local abi = "gnu" if arch == "armv7hl" then @@ -249,6 +250,7 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure %patch0002 -p1 %patch0003 -p1 %patch0004 -p1 +%patch0005 -p1 rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/libssh2-sys/libssh2/ @@ -464,6 +466,9 @@ export %{rust_env} %{_mandir}/man1/cargo*.1* %changelog +* Wed Feb 09 2022 Li Zheng - 1.57.0-2 +- Fix build error + * Sat Jan 22 2022 Liu Zixian - 1.57.0-1 - Update to 1.57.0 @@ -497,19 +502,19 @@ export %{rust_env} * Wed Aug 04 2021 chenyanpanHW - 1.51.0-7 - DESC: delete BuildRequires gdb -* Thu 08 Jul 2021 Jiajie Li - 1.51.0-6 +* Thu Jul 08 2021 Jiajie Li - 1.51.0-6 - Add build require of ninja and llvm -* Thu 01 Jul 2021 Jiajie Li - 1.51.0-5 +* Thu Jul 01 2021 Jiajie Li - 1.51.0-5 - Add support for musl target -* Thu 24 Jun 2021 sunguoshuai - 1.51.0-4 +* Thu Jun 24 2021 sunguoshuai - 1.51.0-4 - fix a println wrong format -* Thu 24 Jun 2021 sunguoshuai - 1.51.0-3 +* Thu Jun 24 2021 sunguoshuai - 1.51.0-3 - cargo help clippy should have description to user -* Wed 23 Jun 2021 sunguoshuai - 1.51.0-2 +* Wed Jun 23 2021 sunguoshuai - 1.51.0-2 - clippy-driver usage should user friendly * Fri May 07 2021 wangyue - 1.51.0-1 @@ -521,7 +526,7 @@ export %{rust_env} * Mon Sep 21 2020 Jeffery.Gao - 1.45.2-1 - Update to 1.45.2 -* Mon Apr 17 2020 zhujunhao - 1.29.1-4 +* Fri Apr 17 2020 zhujunhao - 1.29.1-4 - add llvm in rust * Thu Dec 5 2019 wutao - 1.29.1-3 -- Gitee From 3b7774946540c1072e4a24d3422b6b543b0c9473 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Wed, 9 Feb 2022 07:57:23 +0000 Subject: [PATCH 2/3] update omit-bootstrap-lib-deadcode-warning.patch. --- ...ode-warning.patch => omit-bootstrap-lib-deadcode-warning.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename emit-bootstrap-lib-deadcode-warning.patch => omit-bootstrap-lib-deadcode-warning.patch (100%) diff --git a/emit-bootstrap-lib-deadcode-warning.patch b/omit-bootstrap-lib-deadcode-warning.patch similarity index 100% rename from emit-bootstrap-lib-deadcode-warning.patch rename to omit-bootstrap-lib-deadcode-warning.patch -- Gitee From 65fc272128942c45d6c95f66598c58ffb6fa72c1 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Wed, 9 Feb 2022 07:59:30 +0000 Subject: [PATCH 3/3] update rust.spec. --- rust.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 3529f3e..33176b4 100644 --- a/rust.spec +++ b/rust.spec @@ -29,7 +29,7 @@ Patch0001: rustc-1.56.0-disable-http2.patch Patch0002: clippy-driver-usage-should-user-friendly.patch Patch0003: cargo-help-clippy-should-have-description-to-user.patch Patch0004: fix-a-println-wrong-format.patch -Patch0005: emit-bootstrap-lib-deadcode-warning.patch +Patch0005: omit-bootstrap-lib-deadcode-warning.patch %{lua: function rust_triple(arch) local abi = "gnu" if arch == "armv7hl" then -- Gitee