rust-wasm: 1.76.0 -> 1.77.0

This commit is contained in:
Tim Biermann 2024-03-22 18:59:29 +01:00
parent 34d0d63c68
commit 891faf3c7a
Signed by: tb
GPG Key ID: 42F8B4E30B673606
9 changed files with 155 additions and 1186 deletions

View File

@ -1,13 +1,12 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF37kVHvrVdiOsFmF+QqnbUOaCKEsPMZzma0DBV9E1+nT2b8Bl/lbzBbymEPPo8nwX6Q47RANcIj6Jp7Q79O7idg8=
SHA256 (Pkgfile) = c79b143c030538f65886dd7a4a49be97b5ac744e8badf74176f5b387251da5fb
RWSagIOpLGJF3+llOL4zfNjd8+69eYWpGzd7E0k7boBD3KeUjKWrYpecX8jg3IsvlQ19crVjSQ6BpoaG7FmtDOqA/N0l2yZFLgI=
SHA256 (Pkgfile) = 670b68944ceb183c69da0d8dd41abdcddf4c7882b7fb976a0ce842e89646bd4b
SHA256 (.footprint) = f6b3ffe267c75b6091c8bf0cfb8947e085b953b49d123db62a78707b66e7477d
SHA256 (rustc-1.76.0-src.tar.xz) = 805482b436442a6786d270cacbab8f00529e06141b27b7fb01909b97ce4f3464
SHA256 (rust-std-1.75.0-x86_64-unknown-linux-gnu.tar.xz) = 136b132199f7bbda2aa0bbff6d1e6ae7d5fca2994a2f2a432a5e99de224b6314
SHA256 (rustc-1.75.0-x86_64-unknown-linux-gnu.tar.xz) = 2824ba4045acdddfa436da4f0bb72807b64a089aa2e7c9a66ca1a3a571114ce7
SHA256 (cargo-1.75.0-x86_64-unknown-linux-gnu.tar.xz) = 6ac164e7da969a1d524f747f22792e9aa08bc7446f058314445a4f3c1d31a6bd
SHA256 (llvm18.patch) = 00033e3eceb61520bf2d09ea048b7ef5d3a59ae358f63ae19fbacb96f53b2d4d
SHA256 (0001-bootstrap-Change-libexec-dir.patch) = d2e847d4b4c1094dcb3cd1062e82881c461b7ca3308dfe7a7b6a0d2ac5bac57d
SHA256 (0001-cargo-Change-libexec-dir.patch) = d13721d13fab60d3c80c95f740186b07cfad82af9ee9f52c17c29bf8bce0ba37
SHA256 (0002-compiler-Change-LLVM-targets.patch) = 5763ad5153cf27c1b96fe8769d672a5e47961036be4993197ab9b6fe52471d5d
SHA256 (0004-compiler-Use-wasm-ld-for-wasm-targets.patch) = 2d3834dd30a6db114484d3fa61d256a24f9f56aec6989b14a419f6ee742bcb40
SHA256 (rustc-1.77.0-src.tar.xz) = 66126989782cbf77fa3aff121bbb108429f2d46fe19328c3de231553de711b90
SHA256 (rust-std-1.76.0-x86_64-unknown-linux-gnu.tar.xz) = e41150b52d923a3bbe166c4ecc5719f56576274b0d034d764768aee279ae2063
SHA256 (rustc-1.76.0-x86_64-unknown-linux-gnu.tar.xz) = 9fadfcf71bc6a0ddfd026b9624163faf1c5689dd4a1f7cc1f857167ade4aa6eb
SHA256 (cargo-1.76.0-x86_64-unknown-linux-gnu.tar.xz) = 30ec0ad9fca443ec12c544f9ce448dacdde411a45b9042961938b650e918ccfb
SHA256 (0001-bootstrap-Change-libexec-dir.patch) = 5a0c18e6eee732927f84dd8313622b9262121602a1c506af845961804bb1ee82
SHA256 (0002-bootstrap-Change-bash-completion-dir.patch) = 7ee144ab2c7c717e45e0acefa65d37e42bae45c0b294b0bf5cd6500ce269a37d
SHA256 (0003-compiler-Change-LLVM-targets.patch) = a1656fbe6458cef2587bb7b09c3e573b314e9e8f55a7a8371f45b975f23cb4e9
SHA256 (0004-compiler-Use-wasm-ld-for-wasm-targets.patch) = b5a6ee8942fff48a2165289a24039662945e89a65863d726469cb3bab88d3fb7

View File

@ -1,5 +1,15 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Thu, 6 May 2021 20:14:58 +0200
Subject: [PATCH] bootstrap: Change libexec dir
---
src/bootstrap/src/core/build_steps/dist.rs | 2 +-
src/bootstrap/src/core/build_steps/tool.rs | 2 +-
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 32da4ac29a46..78a5faeae04b 100644
index f50026368dab..6940e0c50752 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) {
@ -12,10 +22,10 @@ index 32da4ac29a46..78a5faeae04b 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 e6d27757ac66..70e499bdabbe 100644
index 5d8d10a7debc..f52315416bd4 100644
--- a/src/bootstrap/src/core/build_steps/tool.rs
+++ b/src/bootstrap/src/core/build_steps/tool.rs
@@ -689,7 +689,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
@@ -682,7 +682,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
// Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
// so that r-a can use it.

View File

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Thu, 6 May 2021 20:13:31 +0200
Subject: [PATCH] cargo: Change libexec dir
---
src/cargo/util/auth/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/util/auth/mod.rs b/src/cargo/util/auth/mod.rs
index 58309964f493..f621e1d643c4 100644
--- a/src/cargo/util/auth/mod.rs
+++ b/src/cargo/util/auth/mod.rs
@@ -711,7 +711,7 @@ fn sysroot_credential(
.parent()
.and_then(|p| p.parent())
.ok_or_else(|| format_err!("expected cargo path {}", cargo.display()))?;
- let exe = root.join("libexec").join(format!(
+ let exe = root.join("lib").join(format!(
"cargo-credential-{}{}",
cred_name,
std::env::consts::EXE_SUFFIX

View File

@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Thu, 13 Jul 2023 21:16:53 +0200
Subject: [PATCH] bootstrap: Change bash-completion dir
---
src/bootstrap/src/core/build_steps/dist.rs | 6 +++++-
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
--- 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<GeneratedTarball> {
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(
+ etc.join("cargo.bashcomp.sh"),
+ "share/bash-completion/completions",
+ "cargo",
+ );
tarball.add_dir(etc.join("man"), "share/man/man1");
tarball.add_legal_and_readme_to("share/doc/cargo");

View File

@ -1,59 +0,0 @@
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index f2ee52262ade..6a813c4b8707 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1832,7 +1832,7 @@ pub fn parse_target_triple(
early_error(error_format, &format!("target file {path:?} does not exist"))
})
}
- Some(target) => TargetTriple::TargetTriple(target),
+ Some(target) => TargetTriple::from_alias(target),
_ => TargetTriple::from_triple(host_triple()),
}
}
diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
index 73e536a7e4d9..af48d437533c 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 {
base.stack_probes = StackProbeType::X86;
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-\
f64:32:64-f80:32-n8:16:32-S128"
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 8909cf33af91..e5b5bce4c290 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -2876,6 +2876,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
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/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
index a91ab365b668..d605eb9ccf81 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
@@ -14,7 +14,7 @@ pub fn target() -> Target {
| SanitizerSet::THREAD;
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-f80:128-n8:16:32:64-S128"
.into(),

View File

@ -0,0 +1,84 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Fri, 12 Mar 2021 17:31:56 +0100
Subject: [PATCH] compiler: Change LLVM targets
- Change x86_64-unknown-linux-gnu to use x86_64-pc-linux-gnu
- Change i686-unknown-linux-gnu to use i686-pc-linux-gnu
Reintroduce the aliasing that was removed in 1.52.0 and alias the -pc-
triples to the -unknown- triples. This avoids defining proper -pc-
targets, as things break when this is done:
- The crate ecosystem expects the -unknown- targets. Making -pc-
rustc's host triple (and thus default target) would break various
crates.
- Firefox's build breaks when the host triple (from
`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(-)
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index d35f951e2aea..7841c4d19094 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
early_dcx.early_fatal(format!("target file {path:?} does not exist"))
})
}
- Some(target) => TargetTriple::TargetTriple(target),
+ Some(target) => TargetTriple::from_alias(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<Self, io::Error> {
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
--- 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 {
base.stack_probes = StackProbeType::Inline;
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"
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
--- 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 {
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(),

View File

@ -1,8 +1,18 @@
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 341763aadbaf..dbb075affc18 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sat, 6 Nov 2021 22:42:06 +0100
Subject: [PATCH] compiler: Use wasm-ld for wasm targets
We don't ship rust-lld.
---
compiler/rustc_target/src/spec/base/wasm.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compiler/rustc_target/src/spec/base/wasm.rs b/compiler/rustc_target/src/spec/base/wasm.rs
index 4b4d2aca26e4..b4918c8fdda2 100644
--- a/compiler/rustc_target/src/spec/base/wasm.rs
+++ b/compiler/rustc_target/src/spec/base/wasm.rs
@@ -89,8 +89,7 @@ macro_rules! args {
@@ -88,8 +88,7 @@ macro_rules! args {
// arguments just yet
limit_rdylib_exports: false,

View File

@ -5,20 +5,19 @@
# Optional: clang ccache libgit2 polly sccache
name=rust-wasm
version=1.76.0
_date=2023-12-28
_rustc=1.75.0
version=1.77.0
_date=2024-02-08
_rustc=1.76.0
_cargo=$_rustc
release=2
release=1
source=(https://static.rust-lang.org/dist/${name/-wasm/}c-$version-src.tar.xz
https://static.rust-lang.org/dist/$_date/rust-std-$_rustc-x86_64-unknown-linux-gnu.tar.xz
https://static.rust-lang.org/dist/$_date/rustc-$_rustc-x86_64-unknown-linux-gnu.tar.xz
https://static.rust-lang.org/dist/$_date/cargo-$_cargo-x86_64-unknown-linux-gnu.tar.xz
llvm18.patch
0001-bootstrap-Change-libexec-dir.patch
0001-cargo-Change-libexec-dir.patch
0002-compiler-Change-LLVM-targets.patch
0002-bootstrap-Change-bash-completion-dir.patch
0003-compiler-Change-LLVM-targets.patch
0004-compiler-Use-wasm-ld-for-wasm-targets.patch)
unpack_source() { # {{{
@ -66,14 +65,9 @@ build() {
cd "${name/-wasm/}c-$version-src"
patch -p1 -i $SRC/llvm18.patch
# Patch cargo so credential helpers are in /usr/lib instead of /usr/libexec
patch -p1 -i $SRC/0001-bootstrap-Change-libexec-dir.patch
# Use our *-pc-linux-gnu targets, making LTO with clang simpler
patch -p1 -i $SRC/0002-compiler-Change-LLVM-targets.patch
patch -p1 -i $SRC/0002-bootstrap-Change-bash-completion-dir.patch
patch -p1 -i $SRC/0003-compiler-Change-LLVM-targets.patch
patch -p1 -i $SRC/0004-compiler-Use-wasm-ld-for-wasm-targets.patch
# config.toml {{{
@ -219,7 +213,7 @@ EOF
DESTDIR=$PKG /usr/bin/python3 ./x.py --config="${SRC}"/config.toml install
# cleanup
rm -r $PKG/usr/{bin/,lib/{librustc_driver-*,libstd-*,libtest-*,rust-analyzer-proc-macro-srv}}
rm -r $PKG/usr/{bin/,lib/{librustc_driver-*,libstd-*}}
rm -r $PKG/usr/share/{doc,man}
rm -r $PKG/usr/lib/rustlib/{components,manifest-rustc,rust-installer-version,uninstall.sh,etc,install.log}
rm -rf $PKG/usr/lib/rustlib/x86_64-unknown-linux-gnu/bin

File diff suppressed because it is too large Load Diff