From d6d6cce2be052f7047de62ff2c4435764388130c Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 4 May 2024 21:13:33 +0000 Subject: [PATCH] extra/rust to 1.78.0-1 --- extra/rust/.SRCINFO | 23 ++++--- .../0001-bootstrap-Change-libexec-dir.patch | 10 +-- ...bootstrap-Change-bash-completion-dir.patch | 6 +- .../0003-compiler-Change-LLVM-targets.patch | 59 ++++++---------- extra/rust/PKGBUILD | 67 ++++++++++--------- 5 files changed, 78 insertions(+), 87 deletions(-) diff --git a/extra/rust/.SRCINFO b/extra/rust/.SRCINFO index 5dc9f1fa8..86591d44b 100644 --- a/extra/rust/.SRCINFO +++ b/extra/rust/.SRCINFO @@ -1,15 +1,17 @@ pkgbase = rust pkgdesc = Systems programming language focused on safety, speed and concurrency - pkgver = 1.77.2 - pkgrel = 2 + pkgver = 1.78.0 + pkgrel = 1 epoch = 1 url = https://www.rust-lang.org/ arch = x86_64 license = Apache-2.0 OR MIT checkdepends = gdb checkdepends = procps-ng + makedepends = clang makedepends = cmake makedepends = lib32-gcc-libs + makedepends = lib32-glibc makedepends = libffi makedepends = lld makedepends = llvm @@ -19,25 +21,29 @@ pkgbase = rust makedepends = python makedepends = rust makedepends = wasi-libc + depends = bash depends = curl depends = gcc depends = gcc-libs + depends = glibc depends = libssh2 depends = llvm-libs + depends = openssl + depends = zlib options = !emptydirs options = !lto - source = https://static.rust-lang.org/dist/rustc-1.77.2-src.tar.gz - source = https://static.rust-lang.org/dist/rustc-1.77.2-src.tar.gz.asc + source = https://static.rust-lang.org/dist/rustc-1.78.0-src.tar.gz + source = https://static.rust-lang.org/dist/rustc-1.78.0-src.tar.gz.asc source = 0001-bootstrap-Change-libexec-dir.patch source = 0002-bootstrap-Change-bash-completion-dir.patch source = 0003-compiler-Change-LLVM-targets.patch source = 0004-compiler-Use-wasm-ld-for-wasm-targets.patch validpgpkeys = 108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE - b2sums = cf9fd96580d2c696e8d2992a5b4ee285824648bfa721212dd7691d63c876cf8fda1d50e924bec891af2c721e3746c4227fd23a0bed48e0b505fcd328936f5a35 + b2sums = 3f43a1c50e268afbe76755ae24bccb3db9ff4dd8bbb8130c75d486c4c0e40f0253c4d4cad1de1040600c090d03d93b08adee5b16fa8abcf36d47a3c14024719f b2sums = SKIP - b2sums = d3ed7043e288c78ac4007b267448457db0972905037754b67249d81be0889f47c4d93573c24d730907c31ec44e80ce696fbf50f98521eadee92c003d2324a1a3 - b2sums = 6afaf5bff729618aa35d84f20b1447694c887b84a406f55344864b9e8dce72f80467412c128b5309d5b962b605ca396b77a52f275dd35681ab50cbedc68f873a - b2sums = 18ca47c350373d9a095aff9a658c61816a542bb391a2a8ddf582f25795a21e9fc344b3e71a2eed7b094610bb61d9658e5360ef2ace9441fd21e4193746d45be7 + b2sums = ef56a70741bae70a95695b4d05d1a6395f545e671c9d016c7180732f69a09b828ff5e16964ef16f9ebec55dd778a1b50927275cd4c21a7b78ae4959946a0657c + b2sums = d20861a8a8e16d4bb0143f00d4beb42e2c52eeb2c1894e9f9c04e3d74ecd750d9bdacf15bb39fd0ade4487b9d3d14da24cf5f25ceab112f096fddcd329320a15 + b2sums = 64391cf17e7d801fb263e9d637928c3a2f6aa11aca6afbf115be4e38e9afce42371ed4884929cf11d6c74c2aa497fb26abbba1812d4f31f44dcda38e4978a33f b2sums = 23f399d5ea776df5dba1ec42a96020a7ae3b18f5a83121d90ca0256a90027529135bac751373a31480860c0dbad30598833a7da43d1e7f25ce5b6d5d945ce550 pkgname = rust @@ -56,6 +62,7 @@ pkgname = rust pkgname = lib32-rust-libs pkgdesc = 32-bit target and libraries for Rust depends = lib32-gcc-libs + depends = lib32-glibc depends = rust provides = lib32-rust conflicts = lib32-rust diff --git a/extra/rust/0001-bootstrap-Change-libexec-dir.patch b/extra/rust/0001-bootstrap-Change-libexec-dir.patch index ebc8f2f84..2c3552b9a 100644 --- a/extra/rust/0001-bootstrap-Change-libexec-dir.patch +++ b/extra/rust/0001-bootstrap-Change-libexec-dir.patch @@ -9,10 +9,10 @@ Subject: [PATCH] bootstrap: Change libexec dir 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs -index f50026368dab..6940e0c50752 100644 +index 012d64e53443..a077e67e49dc 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs -@@ -423,7 +423,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) { +@@ -424,7 +424,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) { }, builder.kind, ) { @@ -22,15 +22,15 @@ index f50026368dab..6940e0c50752 100644 let libdir_relative = builder.libdir_relative(compiler); diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs -index 5d8d10a7debc..f52315416bd4 100644 +index 3c2001121037..17c816c6230a 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs -@@ -682,7 +682,7 @@ fn run(self, builder: &Builder<'_>) -> Option { +@@ -684,7 +684,7 @@ fn run(self, builder: &Builder<'_>) -> Option { // Copy `rust-analyzer-proc-macro-srv` to `/libexec/` // so that r-a can use it. - let libexec_path = builder.sysroot(self.compiler).join("libexec"); + let libexec_path = builder.sysroot(self.compiler).join("lib"); t!(fs::create_dir_all(&libexec_path)); - builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv")); + builder.copy_link(&path, &libexec_path.join("rust-analyzer-proc-macro-srv")); diff --git a/extra/rust/0002-bootstrap-Change-bash-completion-dir.patch b/extra/rust/0002-bootstrap-Change-bash-completion-dir.patch index d0e8b433e..112156d8c 100644 --- a/extra/rust/0002-bootstrap-Change-bash-completion-dir.patch +++ b/extra/rust/0002-bootstrap-Change-bash-completion-dir.patch @@ -8,12 +8,12 @@ Subject: [PATCH] bootstrap: Change bash-completion dir 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs -index 6940e0c50752..d45daad3a829 100644 +index a077e67e49dc..eac689560808 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs -@@ -1071,7 +1071,11 @@ fn run(self, builder: &Builder<'_>) -> Option { +@@ -1072,7 +1072,11 @@ fn run(self, builder: &Builder<'_>) -> Option { - tarball.add_file(&cargo, "bin", 0o755); + tarball.add_file(cargo, "bin", 0o755); tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644); - tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo"); + tarball.add_renamed_file( diff --git a/extra/rust/0003-compiler-Change-LLVM-targets.patch b/extra/rust/0003-compiler-Change-LLVM-targets.patch index 26df177a0..41abedb65 100644 --- a/extra/rust/0003-compiler-Change-LLVM-targets.patch +++ b/extra/rust/0003-compiler-Change-LLVM-targets.patch @@ -17,47 +17,28 @@ targets, as things break when this is done: `rustc --version --verbose`) is different from the target triple (from `rustc --print target-list`) that best matches autoconf. --- - compiler/rustc_session/src/config.rs | 2 +- - compiler/rustc_target/src/spec/mod.rs | 9 +++++++++ - .../src/spec/targets/i686_unknown_linux_gnu.rs | 2 +- - .../src/spec/targets/x86_64_unknown_linux_gnu.rs | 2 +- - 4 files changed, 12 insertions(+), 3 deletions(-) + compiler/rustc_session/src/config.rs | 4 ++++ + .../rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs | 2 +- + .../rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs | 2 +- + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs -index d35f951e2aea..7841c4d19094 100644 +index b7ee2c980254..3be7b748718d 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs -@@ -2221,7 +2221,7 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches +@@ -2222,6 +2222,10 @@ pub fn parse_target_triple(early_dcx: &EarlyDiagCtxt, matches: &getopts::Matches early_dcx.early_fatal(format!("target file {path:?} does not exist")) }) } -- Some(target) => TargetTriple::TargetTriple(target), -+ Some(target) => TargetTriple::from_alias(target), ++ Some(s) if &s == "x86_64-pc-linux-gnu" => { ++ TargetTriple::from_triple("x86_64-unknown-linux-gnu") ++ } ++ Some(s) if &s == "i686-pc-linux-gnu" => TargetTriple::from_triple("i686-unknown-linux-gnu"), + Some(target) => TargetTriple::TargetTriple(target), _ => TargetTriple::from_triple(host_triple()), } - } -diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs -index 6c698c5b01dd..4a1c2dd18b8d 100644 ---- a/compiler/rustc_target/src/spec/mod.rs -+++ b/compiler/rustc_target/src/spec/mod.rs -@@ -3453,6 +3453,15 @@ pub fn from_path(path: &Path) -> Result { - Ok(TargetTriple::TargetJson { path_for_rustdoc: canonicalized_path, triple, contents }) - } - -+ /// Creates a target triple from its alias -+ pub fn from_alias(triple: String) -> Self { -+ match triple.as_str() { -+ "x86_64-pc-linux-gnu" => TargetTriple::from_triple("x86_64-unknown-linux-gnu"), -+ "i686-pc-linux-gnu" => TargetTriple::from_triple("i686-unknown-linux-gnu"), -+ _ => TargetTriple::TargetTriple(triple), -+ } -+ } -+ - /// Returns a string triple for this target. - /// - /// If this target is a path, the file name (without extension) is returned. diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs -index 9bc38a72f4d3..a7a36eb3c9d6 100644 +index 1d4916cabfdf..4caab818efdb 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs @@ -9,7 +9,7 @@ pub fn target() -> Target { @@ -66,19 +47,19 @@ index 9bc38a72f4d3..a7a36eb3c9d6 100644 Target { - llvm_target: "i686-unknown-linux-gnu".into(), + llvm_target: "i686-pc-linux-gnu".into(), - pointer_width: 32, - data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ - i128:128-f64:32:64-f80:32-n8:16:32-S128" + metadata: crate::spec::TargetMetadata { + description: None, + tier: None, diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs -index 2296b58f45dc..a54dbf573dd6 100644 +index 98374023dc57..0e08b8c32229 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs -@@ -17,7 +17,7 @@ pub fn target() -> Target { +@@ -18,7 +18,7 @@ pub fn target() -> Target { base.supports_xray = true; Target { - llvm_target: "x86_64-unknown-linux-gnu".into(), + llvm_target: "x86_64-pc-linux-gnu".into(), - pointer_width: 64, - data_layout: - "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), + metadata: crate::spec::TargetMetadata { + description: None, + tier: None, diff --git a/extra/rust/PKGBUILD b/extra/rust/PKGBUILD index bec860bb1..1216070bc 100644 --- a/extra/rust/PKGBUILD +++ b/extra/rust/PKGBUILD @@ -20,8 +20,8 @@ pkgname=( rust-src ) epoch=1 -pkgver=1.77.2 -pkgrel=2 +pkgver=1.78.0 +pkgrel=1 pkgdesc="Systems programming language focused on safety, speed and concurrency" url=https://www.rust-lang.org/ arch=(x86_64) @@ -31,13 +31,18 @@ options=( !lto ) depends=( + bash curl gcc gcc-libs + glibc libssh2 llvm-libs + openssl + zlib ) makedepends=( + clang cmake libffi lld @@ -59,11 +64,11 @@ source=( 0003-compiler-Change-LLVM-targets.patch 0004-compiler-Use-wasm-ld-for-wasm-targets.patch ) -b2sums=('cf9fd96580d2c696e8d2992a5b4ee285824648bfa721212dd7691d63c876cf8fda1d50e924bec891af2c721e3746c4227fd23a0bed48e0b505fcd328936f5a35' +b2sums=('3f43a1c50e268afbe76755ae24bccb3db9ff4dd8bbb8130c75d486c4c0e40f0253c4d4cad1de1040600c090d03d93b08adee5b16fa8abcf36d47a3c14024719f' 'SKIP' - 'd3ed7043e288c78ac4007b267448457db0972905037754b67249d81be0889f47c4d93573c24d730907c31ec44e80ce696fbf50f98521eadee92c003d2324a1a3' - '6afaf5bff729618aa35d84f20b1447694c887b84a406f55344864b9e8dce72f80467412c128b5309d5b962b605ca396b77a52f275dd35681ab50cbedc68f873a' - '18ca47c350373d9a095aff9a658c61816a542bb391a2a8ddf582f25795a21e9fc344b3e71a2eed7b094610bb61d9658e5360ef2ace9441fd21e4193746d45be7' + 'ef56a70741bae70a95695b4d05d1a6395f545e671c9d016c7180732f69a09b828ff5e16964ef16f9ebec55dd778a1b50927275cd4c21a7b78ae4959946a0657c' + 'd20861a8a8e16d4bb0143f00d4beb42e2c52eeb2c1894e9f9c04e3d74ecd750d9bdacf15bb39fd0ade4487b9d3d14da24cf5f25ceab112f096fddcd329320a15' + '64391cf17e7d801fb263e9d637928c3a2f6aa11aca6afbf115be4e38e9afce42371ed4884929cf11d6c74c2aa497fb26abbba1812d4f31f44dcda38e4978a33f' '23f399d5ea776df5dba1ec42a96020a7ae3b18f5a83121d90ca0256a90027529135bac751373a31480860c0dbad30598833a7da43d1e7f25ce5b6d5d945ce550') validpgpkeys=( 108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE # Rust Language (Tag and Release Signing Key) @@ -87,7 +92,7 @@ prepare() { cat >config.toml <