Skip to content

Commit 63209eb

Browse files
committed
upgpatch: rust 1.65.0
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
1 parent e1c0b29 commit 63209eb

File tree

3 files changed

+43
-58
lines changed

3 files changed

+43
-58
lines changed

rust/jemalloc-sys-pick.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/build.rs b/build.rs
2+
index b4c0266..612b197 100644
3+
--- a/build.rs
4+
+++ b/build.rs
5+
@@ -331,6 +331,7 @@ fn gnu_target(target: &str) -> String {
6+
"i686-pc-windows-gnu" => "i686-w64-mingw32".to_string(),
7+
"x86_64-pc-windows-gnu" => "x86_64-w64-mingw32".to_string(),
8+
"armv7-linux-androideabi" => "arm-linux-androideabi".to_string(),
9+
+ "riscv64gc-unknown-linux-gnu" => "riscv64-unknown-linux-gnu".to_string(),
10+
s => s.to_string(),
11+
}
12+
}

rust/replace_patched_libc_cc.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

rust/riscv64.patch

Lines changed: 31 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git PKGBUILD PKGBUILD
2-
index df4805d..730bc90 100644
2+
index 498e2b4..ebb4cf6 100644
33
--- PKGBUILD
44
+++ PKGBUILD
55
@@ -5,7 +5,7 @@
@@ -9,9 +9,9 @@ index df4805d..730bc90 100644
99
-pkgname=(rust lib32-rust-libs rust-musl rust-wasm rust-src)
1010
+pkgname=(rust rust-musl rust-wasm rust-src)
1111
epoch=1
12-
pkgver=1.64.0
12+
pkgver=1.65.0
1313
pkgrel=1
14-
@@ -15,24 +15,28 @@ arch=(x86_64)
14+
@@ -15,7 +15,7 @@ arch=(x86_64)
1515
license=(MIT Apache)
1616
options=(!emptydirs !strip !lto)
1717
depends=(gcc-libs llvm-libs curl libssh2 gcc)
@@ -20,40 +20,45 @@ index df4805d..730bc90 100644
2020
wasi-libc lld)
2121
checkdepends=(procps-ng gdb)
2222
source=(
23-
"https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
24-
+ "rust-1.64.0-regression.patch::https://github.com/rust-lang/rust/commit/263edd43c5255084292329423c61a9d69715ebfa.patch"
25-
0001-cargo-Change-libexec-dir.patch
23+
@@ -24,13 +24,17 @@ source=(
2624
0001-bootstrap-Change-libexec-dir.patch
2725
0002-compiler-Change-LLVM-targets.patch
2826
0003-compiler-Use-wasm-ld-for-wasm-targets.patch
29-
remove-include-linux-fs.h.patch
30-
+ replace_patched_libc_cc.patch
27+
+ "cc-rs-pick.patch"::"https://github.com/rust-lang/cc-rs/pull/676.patch"
28+
+ "jemalloc-sys-pick.patch"
3129
)
32-
sha256sums=('b3cd9f481e1a2901bf6f3808d30c69cc4ea80d93c4cc4e2ed52258b180381205'
30+
sha256sums=('5828bb67f677eabf8c384020582b0ce7af884e1c84389484f7f8d00dd82c0038'
3331
'SKIP'
34-
+ '710a0f0f35da1951a3ae5eb63ed4a86e85eaf9a248ff56ef734d993a698bedd3'
3532
'c901a9bb036c29ca092f7dbc8b447efdd9aa1044a902a88f9d024cb22681dc19'
36-
'84ae2843d5ed83e9400e96d5f2d8cf3d1b89809bea76897c2762743460e06a87'
37-
'1986e62bd2826eacaadd681e294943d890d75f24fd1f54fbd4015c3c622ac097'
38-
'8fa64a2bdfb798184bde1c80d4775889a91d8b2ed076a6ea29ea99df9a2098cc'
39-
- '34ed866e313e4580130a50118a4410d36fa0159123982521b6ef049439fc32ad')
40-
+ '34ed866e313e4580130a50118a4410d36fa0159123982521b6ef049439fc32ad'
41-
+ '908de2d6d84358289ff2667aca3360a3bc91cbe8d2687ee5b02474088282ff37')
33+
'c88389c7ac2ce832c39450171af8fbd9bfe26f8e683f28b776b492c972fda359'
34+
'5fd1d52cb58c31fb6b0179eec41f5234523dfce799c8f895b1d2d663ca0573db'
35+
- '27cc0fa1ef37c1ced77f62c6b0de7590b8aa88256dced3f9b87adb7c488ffa5e')
36+
+ '27cc0fa1ef37c1ced77f62c6b0de7590b8aa88256dced3f9b87adb7c488ffa5e'
37+
+ '8196115c9b5d512672aa001152f7ae0864cedd71cef2aaa6334cf284b0f4ad9e'
38+
+ 'dda34cb5300511aa0aff6bc39bdbb17215ea60bee81bc52f64e3474d6cbda516')
4239
validpgpkeys=(108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE # Rust Language (Tag and Release Signing Key) <[email protected]>
4340
474E22316ABF4785A88C6E8EA2C794A986419D8A) # Tom Stellard <[email protected]>
4441

45-
@@ -53,6 +57,10 @@ prepare() {
46-
# https://github.com/llvm/llvm-project/issues/56421
47-
patch -Np1 -d src/llvm-project < ../remove-include-linux-fs.h.patch
42+
@@ -48,6 +52,18 @@ prepare() {
43+
# Use our wasm-ld
44+
patch -Np1 -i ../0003-compiler-Use-wasm-ld-for-wasm-targets.patch
4845

49-
+ patch -Np1 -i "../replace_patched_libc_cc.patch"
46+
+ cd vendor/cc
47+
+ OLDSUM=`sha256sum src/lib.rs | head -c 64`
48+
+ patch -Np1 -i ../../../cc-rs-pick.patch
49+
+ sed -i "s/$OLDSUM/`sha256sum src/lib.rs | head -c 64`/g" .cargo-checksum.json
50+
+ cd ../..
5051
+
51-
+ patch -Rp1 -i "../rust-1.64.0-regression.patch"
52+
+ cd vendor/jemalloc-sys
53+
+ OLDSUM=`sha256sum build.rs | head -c 64`
54+
+ patch -Np1 -i ../../../jemalloc-sys-pick.patch
55+
+ sed -i "s/$OLDSUM/`sha256sum build.rs | head -c 64`/g" .cargo-checksum.json
56+
+ cd ../..
5257
+
5358
cat >config.toml <<END
5459
changelog-seen = 2
5560
profile = "user"
56-
@@ -62,9 +70,8 @@ link-shared = true
61+
@@ -57,9 +73,8 @@ link-shared = true
5762

5863
[build]
5964
target = [
@@ -65,16 +70,7 @@ index df4805d..730bc90 100644
6570
"wasm32-unknown-unknown",
6671
"wasm32-wasi",
6772
]
68-
@@ -90,7 +97,7 @@ description = "Arch Linux $pkgbase $epoch:$pkgver-$pkgrel"
69-
rpath = false
70-
backtrace-on-ice = true
71-
remap-debuginfo = true
72-
-jemalloc = true
73-
+# jemalloc = true
74-
75-
# LLVM crashes when passing an object through ThinLTO twice. This is triggered
76-
# when using rust code in cross-language LTO if libstd was built using ThinLTO.
77-
@@ -104,22 +111,18 @@ deny-warnings = false
73+
@@ -99,22 +114,18 @@ deny-warnings = false
7874
[dist]
7975
compression-formats = ["gz"]
8076

@@ -101,17 +97,7 @@ index df4805d..730bc90 100644
10197

10298
[target.wasm32-unknown-unknown]
10399
sanitizers = false
104-
@@ -130,6 +133,9 @@ sanitizers = false
105-
profiler = false
106-
wasi-root = "/usr/share/wasi-sysroot"
107-
END
108-
+
109-
+ cd src/bootstrap
110-
+ cargo update -p cc
111-
}
112-
113-
_pick() {
114-
@@ -157,9 +163,7 @@ build() {
100+
@@ -152,9 +163,7 @@ build() {
115101

116102
# rustbuild always installs copies of the shared libraries to /usr/lib,
117103
# overwrite them with symlinks to the per-architecture versions
@@ -122,7 +108,7 @@ index df4805d..730bc90 100644
122108

123109
mkdir -p usr/share/bash-completion
124110
mv etc/bash_completion.d usr/share/bash-completion/completions
125-
@@ -167,8 +171,7 @@ build() {
111+
@@ -162,8 +171,7 @@ build() {
126112
mkdir -p usr/share/licenses/rust
127113
mv -t usr/share/licenses/rust usr/share/doc/rust/{COPYRIGHT,LICENSE*}
128114

@@ -132,7 +118,7 @@ index df4805d..730bc90 100644
132118
_pick dest-wasm usr/lib/rustlib/wasm32-*
133119
_pick dest-src usr/lib/rustlib/src
134120
}
135-
@@ -183,19 +186,6 @@ package_rust() {
121+
@@ -178,19 +186,6 @@ package_rust() {
136122
cp -a dest-rust/* "$pkgdir"
137123
}
138124

0 commit comments

Comments
 (0)