From 734589a4e9632f38e0bbef95b8c0eb8ba2f6e605 Mon Sep 17 00:00:00 2001 From: wk333 <13474090681@163.com> Date: Mon, 9 Dec 2024 16:55:15 +0800 Subject: [PATCH] test 1.83 --- ...sm-component-ld-to-match-other-tools.patch | 147 ------------------ 0001-add-support-for-ppc64le.patch | 4 +- ...st-1.83.0-aarch64-unknown-linux-gnu.tar.xz | 4 +- ...-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz | 4 +- ...ust-1.83.0-x86_64-unknown-linux-gnu.tar.xz | 4 +- rust.spec | 26 ++-- rustc-1.82.0-src.tar.xz.asc | 16 -- ...inux-gnu.tar.xz => rustc-1.83.0-src.tar.xz | 4 +- rustc-1.83.0-src.tar.xz.asc | 16 ++ 9 files changed, 40 insertions(+), 185 deletions(-) delete mode 100644 0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch rename rustc-1.82.0-src.tar.xz => rust-1.83.0-aarch64-unknown-linux-gnu.tar.xz (32%) rename rust-1.82.0-aarch64-unknown-linux-gnu.tar.xz => rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz (32%) rename rust-1.82.0-riscv64gc-unknown-linux-gnu.tar.xz => rust-1.83.0-x86_64-unknown-linux-gnu.tar.xz (32%) delete mode 100644 rustc-1.82.0-src.tar.xz.asc rename rust-1.82.0-x86_64-unknown-linux-gnu.tar.xz => rustc-1.83.0-src.tar.xz (32%) create mode 100644 rustc-1.83.0-src.tar.xz.asc diff --git a/0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch b/0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch deleted file mode 100644 index 5364012..0000000 --- a/0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch +++ /dev/null @@ -1,147 +0,0 @@ -From c15469a7fec811d1a4f69ff26e18c6f383df41d2 Mon Sep 17 00:00:00 2001 -From: Alex Crichton -Date: Fri, 6 Sep 2024 09:21:33 -0700 -Subject: [PATCH] Fix enabling wasm-component-ld to match other tools - -It was [pointed out recently][comment] that enabling `wasm-component-ld` -as a host tool is different from other host tools. This commit refactors -the logic to match by deduplicating selection of when to build other -tools and then using the same logic for `wasm-component-ld`. - -[comment]: https://github.com/rust-lang/rust/pull/127866#issuecomment-2333434720 ---- - src/bootstrap/src/core/build_steps/compile.rs | 2 +- - src/bootstrap/src/core/build_steps/dist.rs | 2 +- - src/bootstrap/src/core/build_steps/tool.rs | 38 +++---------------- - src/bootstrap/src/lib.rs | 17 +++++---- - 4 files changed, 17 insertions(+), 42 deletions(-) - -diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index 1936c91ef83c..102c9fd25543 100644 ---- a/src/bootstrap/src/core/build_steps/compile.rs -+++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -1912,7 +1912,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler { - // delegates to the `rust-lld` binary for linking and then runs - // logic to create the final binary. This is used by the - // `wasm32-wasip2` target of Rust. -- if builder.build_wasm_component_ld() { -+ if builder.tool_enabled("wasm-component-ld") { - let wasm_component_ld_exe = - builder.ensure(crate::core::build_steps::tool::WasmComponentLd { - compiler: build_compiler, -diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs -index 4957de2e1b79..ccb5656d6716 100644 ---- a/src/bootstrap/src/core/build_steps/dist.rs -+++ b/src/bootstrap/src/core/build_steps/dist.rs -@@ -473,7 +473,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) { - ); - } - } -- if builder.build_wasm_component_ld() { -+ if builder.tool_enabled("wasm-component-ld") { - let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin"); - let ld = exe("wasm-component-ld", compiler.host); - builder.copy_link(&src_dir.join(&ld), &dst_dir.join(&ld)); -diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs -index 3a1eb43b801f..3c2d791c2090 100644 ---- a/src/bootstrap/src/core/build_steps/tool.rs -+++ b/src/bootstrap/src/core/build_steps/tool.rs -@@ -693,14 +693,7 @@ impl Step for Cargo { - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - let builder = run.builder; -- run.path("src/tools/cargo").default_condition( -- builder.config.extended -- && builder.config.tools.as_ref().map_or( -- true, -- // If `tools` is set, search list for this tool. -- |tools| tools.iter().any(|tool| tool == "cargo"), -- ), -- ) -+ run.path("src/tools/cargo").default_condition(builder.tool_enabled("cargo")) - } - - fn make_run(run: RunConfig<'_>) { -@@ -772,14 +765,7 @@ impl Step for RustAnalyzer { - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - let builder = run.builder; -- run.path("src/tools/rust-analyzer").default_condition( -- builder.config.extended -- && builder -- .config -- .tools -- .as_ref() -- .map_or(true, |tools| tools.iter().any(|tool| tool == "rust-analyzer")), -- ) -+ run.path("src/tools/rust-analyzer").default_condition(builder.tool_enabled("rust-analyzer")) - } - - fn make_run(run: RunConfig<'_>) { -@@ -821,12 +807,8 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.path("src/tools/rust-analyzer") - .path("src/tools/rust-analyzer/crates/proc-macro-srv-cli") - .default_condition( -- builder.config.extended -- && builder.config.tools.as_ref().map_or(true, |tools| { -- tools.iter().any(|tool| { -- tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv" -- }) -- }), -+ builder.tool_enabled("rust-analyzer") -+ || builder.tool_enabled("rust-analyzer-proc-macro-srv"), - ) - } - -@@ -874,16 +856,8 @@ impl Step for LlvmBitcodeLinker { - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - let builder = run.builder; -- run.path("src/tools/llvm-bitcode-linker").default_condition( -- builder.config.extended -- && builder -- .config -- .tools -- .as_ref() -- .map_or(builder.build.unstable_features(), |tools| { -- tools.iter().any(|tool| tool == "llvm-bitcode-linker") -- }), -- ) -+ run.path("src/tools/llvm-bitcode-linker") -+ .default_condition(builder.tool_enabled("llvm-bitcode-linker")) - } - - fn make_run(run: RunConfig<'_>) { -diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs -index c76ce3409562..780024e307ed 100644 ---- a/src/bootstrap/src/lib.rs -+++ b/src/bootstrap/src/lib.rs -@@ -1407,16 +1407,17 @@ fn default_wasi_runner(&self) -> Option { - None - } - -- /// Returns whether it's requested that `wasm-component-ld` is built as part -- /// of the sysroot. This is done either with the `extended` key in -- /// `config.toml` or with the `tools` set. -- fn build_wasm_component_ld(&self) -> bool { -- if self.config.extended { -- return true; -+ /// Returns whether the specified tool is configured as part of this build. -+ /// -+ /// This requires that both the `extended` key is set and the `tools` key is -+ /// either unset or specifically contains the specified tool. -+ fn tool_enabled(&self, tool: &str) -> bool { -+ if !self.config.extended { -+ return false; - } - match &self.config.tools { -- Some(set) => set.contains("wasm-component-ld"), -- None => false, -+ Some(set) => set.contains(tool), -+ None => true, - } - } - --- -2.46.0 - diff --git a/0001-add-support-for-ppc64le.patch b/0001-add-support-for-ppc64le.patch index dbd1e0e..5a9db2b 100644 --- a/0001-add-support-for-ppc64le.patch +++ b/0001-add-support-for-ppc64le.patch @@ -145,8 +145,8 @@ index 1264742..14427a7 100644 "s390x-unknown-linux-musl" => "linux64-s390x", diff --git a/vendor/target-lexicon-0.12.15/src/targets.rs b/vendor/target-lexicon-0.12.15/src/targets.rs index d14a7607b..f64e49568 100644 ---- a/vendor/target-lexicon-0.12.15/src/targets.rs -+++ b/vendor/target-lexicon-0.12.15/src/targets.rs +--- a/vendor/target-lexicon-0.12.16/src/targets.rs ++++ b/vendor/target-lexicon-0.12.16/src/targets.rs @@ -1692,6 +1692,9 @@ mod tests { "powerpc64le-unknown-freebsd", "powerpc64le-unknown-linux-gnu", diff --git a/rustc-1.82.0-src.tar.xz b/rust-1.83.0-aarch64-unknown-linux-gnu.tar.xz similarity index 32% rename from rustc-1.82.0-src.tar.xz rename to rust-1.83.0-aarch64-unknown-linux-gnu.tar.xz index c83dcc0..067525f 100644 --- a/rustc-1.82.0-src.tar.xz +++ b/rust-1.83.0-aarch64-unknown-linux-gnu.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1276a0bb8fa12288ba6fa96597d28b40e74c44257c051d3bc02c2b049bb38210 -size 219769328 +oid sha256:5f02e00bca65f6eebafe2ac6b1bbdecb5f160f260a9c2231a51ed8d382f0ada0 +size 237502772 diff --git a/rust-1.82.0-aarch64-unknown-linux-gnu.tar.xz b/rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz similarity index 32% rename from rust-1.82.0-aarch64-unknown-linux-gnu.tar.xz rename to rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz index 5e0f13e..a84d349 100644 --- a/rust-1.82.0-aarch64-unknown-linux-gnu.tar.xz +++ b/rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99acf175be33bd96ac82d644125d0e2acc6962d61ee64851edc7d8ba3bd23ca4 -size 236675048 +oid sha256:ce9308beb0bb54560921821934625b9cdee01d8e6d269e252e9aaf630330b773 +size 218315040 diff --git a/rust-1.82.0-riscv64gc-unknown-linux-gnu.tar.xz b/rust-1.83.0-x86_64-unknown-linux-gnu.tar.xz similarity index 32% rename from rust-1.82.0-riscv64gc-unknown-linux-gnu.tar.xz rename to rust-1.83.0-x86_64-unknown-linux-gnu.tar.xz index 3c3cd4f..b7ebdd4 100644 --- a/rust-1.82.0-riscv64gc-unknown-linux-gnu.tar.xz +++ b/rust-1.83.0-x86_64-unknown-linux-gnu.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:532190c3cdbdee9249bcde648b1c61b092bdd8885266ba9edd6df6824a454958 -size 217304308 +oid sha256:b6467a0e8a6c5dca35269785c994e4d80d89754d6c600162cc9146f90c87ee08 +size 180329116 diff --git a/rust.spec b/rust.spec index 5b5eb6e..6505e1c 100644 --- a/rust.spec +++ b/rust.spec @@ -1,8 +1,7 @@ -%define _lto_cflags %{nil} -%global bootstrap_rust 1.82.0 -%global bootstrap_cargo 1.82.0 -%global bootstrap_channel 1.82.0 -%global bootstrap_date 2024-06-13 +%global bootstrap_rust 1.83.0 +%global bootstrap_cargo 1.83.0 +%global bootstrap_channel 1.83.0 +%global bootstrap_date 2024-11-28 %global bootstrap_arches x86_64 aarch64 riscv64 %bcond_with llvm_static %bcond_without bundled_llvm @@ -22,8 +21,8 @@ %endif Name: rust -Version: 1.82.0 -Release: 6 +Version: 1.83.0 +Release: 1 Summary: The Rust Programming Language License: Apache-2.0 OR MIT URL: https://www.rust-lang.org @@ -41,9 +40,7 @@ Patch0001: 0001-Use-lld-provided-by-system.patch # Set a substitute-path in rust-gdb for standard library sources. Patch0002: rustc-1.70.0-rust-gdb-substitute-path.patch Patch0003: 0001-add-support-for-ppc64le.patch -# https://github.com/rust-lang/rust/pull/130034 (from 1.83) -Patch0004: 0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch -Patch0005: 0001-fix-build-error-for-loongarch64.patch +Patch0005: 0001-fix-build-error-for-loongarch64.patch %{lua: function rust_triple(arch) local abi = "gnu" @@ -281,7 +278,6 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure %patch -P 0001 -p1 %patch -P 0002 -p1 %patch -P 0003 -p1 -%patch -P 0004 -p1 %patch -P 0005 -p1 rm -rf vendor/curl-sys*/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ @@ -556,9 +552,15 @@ export %{rust_env} * Fri Nov 29 2024 jchzhou - 1.82.0-4 - Fix a minor unpackaged file issue -* Wed Nov 20 2024 Wenl4ng - 1.82.0-3 +* Fri Dec 06 2024 jchzhou - 1.82.0-5 +- Add a switch for the musl target & disable it for loongarch64 & riscv64 + +* Fri Nov 22 2024 Wenl4ng - 1.82.0-4 - use lfs-server +* Fri Nov 22 2024 Wenlong Zhang - 1.82.0-3 +- fix build error for loongarch64 + * Wed Nov 13 2024 jchzhou - 1.82.0-2 - Switch to bundled llvm for building, halve the 'max_cpus' in this case diff --git a/rustc-1.82.0-src.tar.xz.asc b/rustc-1.82.0-src.tar.xz.asc deleted file mode 100644 index 3c1b012..0000000 --- a/rustc-1.82.0-src.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -wsFcBAABCgAQBQJnETfJCRCFq5bm+hvl/gAASrIP/R3fPIF8QTLm3MxtYYYESIUz -BbTUeC3NCuasXFLY7lPPazlgMTvtuRxn4qpTliwtGKtCDWtr1LdzwzFCw2zrW72g -wA/HHvpq16z3Qkk6kjW27c+QQVatAmBtpydehHo3V4QeMs1piMEbGT7cnyN/cW+u -o4YoBdfRMDKV13n516QhBDI7+LzF/Tz1P7RYYnXhSFQ4DwZZBdZni5udaELI8I2R -bhFwe0AC/msClq+Wo5u8I5qfmzUf4hj+zVCUeWt8srk434DkgEX+5lz4jkQH1WLv -HMZXyfx0xwynOe00teZKy6X8lD9KgF0EgbKEjntPbXlGiLWSRpFFvkPpz6DNQ0Hy -QiVqebi7skwO+SK/Go45SAnIH4y/nlMMx0RAtivDtk53VNU68wju5dXJ5KiWCWyc -vWZROmT5SdYFtaEGtiQyS4vhXKZ0mbTDX0LjxogLf+eW4wyRk91zzUxkpZ69SuSG -cR6AblMjvcjCfwgbSNkA4zg5V3OKs4WmuEyeO4Q/EMCO6+USjzwjqOB5L1NSFUkL -8z0qC70x68PR7d7mXgnqui4zISrYeXYe9nVRkwNwNFWFWBNUtW/LUGD/v6ee9CWD -0cYmInsUFM8DxtqJH0rsfd78qjrQwEtoReTrwO1fs9E5L3kCqZm5tNxp6A2vgCr/ -PIc5UHGVeUxQWc1bYNha -=IXFx ------END PGP SIGNATURE----- diff --git a/rust-1.82.0-x86_64-unknown-linux-gnu.tar.xz b/rustc-1.83.0-src.tar.xz similarity index 32% rename from rust-1.82.0-x86_64-unknown-linux-gnu.tar.xz rename to rustc-1.83.0-src.tar.xz index e92b3a3..62e6a4f 100644 --- a/rust-1.82.0-x86_64-unknown-linux-gnu.tar.xz +++ b/rustc-1.83.0-src.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a6bf24ca1fee2bd861590431c7954674191a0c0dfa0af4169731bc1459cf58a -size 178075016 +oid sha256:7b11d4242dab0921a7d54758ad3fe805153c979c144625fecde11735760f97df +size 353808388 diff --git a/rustc-1.83.0-src.tar.xz.asc b/rustc-1.83.0-src.tar.xz.asc new file mode 100644 index 0000000..c4e6626 --- /dev/null +++ b/rustc-1.83.0-src.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +wsFcBAABCgAQBQJnSHLqCRCFq5bm+hvl/gAAe54P/39kd/k6ZXxUwH115gHRGDbB +k4jBGolmSDNmapCOa0Or75ykRVvRUfuP9OLNRn4PbDx69g3TA3/Sw7LZ6kepwtnD +C0e+PP+CrRhc/5HJBGdl7WJUEwRciPV36gsuXQwSTfQiSj8z/70yAMjxBPT7e7Iv +YapeVEZ9DnlEdfURCOYgUNGupwe5NVqXLl5WTGzFXBlIRuQvYC6mAsgtP0XXw5ou +kMdXqOGtKlqbAw9oFr1nU9i2G5h5b3sEOtn1mlGSZTk191FTT4lCwWsoy967omhc +3JFt6j6JW1WymT9pN83TN+qBrWBws6hiJBi5W7Hkpd7GsTVMNSoExKkRDSw9lxtN +xFA4VoAl88JC6FZYQNoxZ2Xm86S5APLlNlaJDFGu1pErQmvk1nXaU8nY29zxo8J3 +TlmxGj4ksaqTa/qLyVmfAciHPJEKuhFdX7at9Ld25KV2DOOp4ZCsYC8a2kdlZi0q ++EnZUIZiFci1z/uYEZZCVEZ6QLPEyF6an4n4SPvu5yXtlYUFskKsrSIOT8Ln/QbC +cRY/mrIJV2z0lUQSrTg3BW0o1cCdqyZ2acUGuvjawYZkk0hk/UBYibW5vOkmg6aw +2vJhmjaWV5f+J24v2NsbMFOHlnybz6EBsvxjOA/l2UMgmzqeg0ZJWrjsk3EjBGtu +TJ1hlJjFE5rRYnVrf6ud +=tqIR +-----END PGP SIGNATURE----- -- Gitee