Skip to content

Commit

Permalink
updpatch: rust 1.64.0
Browse files Browse the repository at this point in the history
 + Trivial adaption to Arch Linux PKGBUILD.
 + Reverts regressed commit causing ICE during bootstrap.
  • Loading branch information
r-value authored and felixonmars committed Oct 11, 2022
1 parent 329a290 commit 5fec795
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions rust/riscv64.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git PKGBUILD PKGBUILD
index 33307ea..9a63d1a 100644
index df4805d..730bc90 100644
--- PKGBUILD
+++ PKGBUILD
@@ -5,7 +5,7 @@
Expand All @@ -9,9 +9,9 @@ index 33307ea..9a63d1a 100644
-pkgname=(rust lib32-rust-libs rust-musl rust-wasm rust-src)
+pkgname=(rust rust-musl rust-wasm rust-src)
epoch=1
pkgver=1.63.0
pkgver=1.64.0
pkgrel=1
@@ -15,7 +15,7 @@ arch=(x86_64)
@@ -15,24 +15,28 @@ arch=(x86_64)
license=(MIT Apache)
options=(!emptydirs !strip !lto)
depends=(gcc-libs llvm-libs curl libssh2 gcc)
Expand All @@ -20,34 +20,40 @@ index 33307ea..9a63d1a 100644
wasi-libc lld)
checkdepends=(procps-ng gdb)
source=(
@@ -25,6 +25,7 @@ source=(
"https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz"{,.asc}
+ "rust-1.64.0-regression.patch::https://github.com/rust-lang/rust/commit/263edd43c5255084292329423c61a9d69715ebfa.patch"
0001-cargo-Change-libexec-dir.patch
0001-bootstrap-Change-libexec-dir.patch
0002-compiler-Change-LLVM-targets.patch
0003-compiler-Use-wasm-ld-for-wasm-targets.patch
remove-include-linux-fs.h.patch
+ replace_patched_libc_cc.patch
)
sha256sums=('1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0'
sha256sums=('b3cd9f481e1a2901bf6f3808d30c69cc4ea80d93c4cc4e2ed52258b180381205'
'SKIP'
@@ -32,7 +33,8 @@ sha256sums=('1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0'
'7080a88e44234aa363ba6321f319c8d9621382dd9581748a43847dae005e55bd'
'5137df0a3399e279db4c5b83ae8e99d2c1977f62aec2f90521edb02f51597064'
'26bf232d144b81a303ed91f6a331ddf004c5d9fefd41a11e36b61812a34459aa'
+ '710a0f0f35da1951a3ae5eb63ed4a86e85eaf9a248ff56ef734d993a698bedd3'
'c901a9bb036c29ca092f7dbc8b447efdd9aa1044a902a88f9d024cb22681dc19'
'84ae2843d5ed83e9400e96d5f2d8cf3d1b89809bea76897c2762743460e06a87'
'1986e62bd2826eacaadd681e294943d890d75f24fd1f54fbd4015c3c622ac097'
'8fa64a2bdfb798184bde1c80d4775889a91d8b2ed076a6ea29ea99df9a2098cc'
- '34ed866e313e4580130a50118a4410d36fa0159123982521b6ef049439fc32ad')
+ '34ed866e313e4580130a50118a4410d36fa0159123982521b6ef049439fc32ad'
+ '908de2d6d84358289ff2667aca3360a3bc91cbe8d2687ee5b02474088282ff37')
validpgpkeys=(108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE # Rust Language (Tag and Release Signing Key) <[email protected]>
474E22316ABF4785A88C6E8EA2C794A986419D8A) # Tom Stellard <[email protected]>

@@ -53,6 +55,8 @@ prepare() {
@@ -53,6 +57,10 @@ prepare() {
# https://github.com/llvm/llvm-project/issues/56421
patch -Np1 -d src/llvm-project < ../remove-include-linux-fs.h.patch

+ patch -Np1 -i "../replace_patched_libc_cc.patch"
+
+ patch -Rp1 -i "../rust-1.64.0-regression.patch"
+
cat >config.toml <<END
changelog-seen = 2
profile = "user"
@@ -62,9 +66,8 @@ link-shared = true
@@ -62,9 +70,8 @@ link-shared = true

[build]
target = [
Expand All @@ -59,22 +65,33 @@ index 33307ea..9a63d1a 100644
"wasm32-unknown-unknown",
"wasm32-wasi",
]
@@ -90,7 +93,6 @@ description = "Arch Linux $pkgbase $epoch:$pkgver-$pkgrel"
@@ -90,7 +97,7 @@ description = "Arch Linux $pkgbase $epoch:$pkgver-$pkgrel"
rpath = false
backtrace-on-ice = true
remap-debuginfo = true
-jemalloc = true
+# jemalloc = true

# LLVM crashes when passing an object through ThinLTO twice. This is triggered
# when using rust code in cross-language LTO if libstd was built using ThinLTO.
@@ -104,12 +106,14 @@ deny-warnings = false
@@ -104,22 +111,18 @@ deny-warnings = false
[dist]
compression-formats = ["gz"]

-[target.x86_64-unknown-linux-gnu]
+[target.riscv64gc-unknown-linux-gnu]
cc = "/usr/bin/gcc"
cxx = "/usr/bin/g++"
ar = "/usr/bin/gcc-ar"
ranlib = "/usr/bin/gcc-ranlib"
llvm-config = "/usr/bin/llvm-config"

-[target.i686-unknown-linux-gnu]
-cc = "/usr/bin/gcc"
-cxx = "/usr/bin/g++"
-ar = "/usr/bin/gcc-ar"
-ranlib = "/usr/bin/gcc-ranlib"
-
-[target.x86_64-unknown-linux-musl]
+[target.riscv64gc-unknown-linux-musl]
sanitizers = false
Expand All @@ -84,16 +101,17 @@ index 33307ea..9a63d1a 100644

[target.wasm32-unknown-unknown]
sanitizers = false
@@ -120,6 +124,8 @@ sanitizers = false
@@ -130,6 +133,9 @@ sanitizers = false
profiler = false
wasi-root = "/usr/share/wasi-sysroot"
END
+
+ cargo update -p bootstrap
+ cd src/bootstrap
+ cargo update -p cc
}

_pick() {
@@ -147,9 +153,7 @@ build() {
@@ -157,9 +163,7 @@ build() {

# rustbuild always installs copies of the shared libraries to /usr/lib,
# overwrite them with symlinks to the per-architecture versions
Expand All @@ -104,7 +122,7 @@ index 33307ea..9a63d1a 100644

mkdir -p usr/share/bash-completion
mv etc/bash_completion.d usr/share/bash-completion/completions
@@ -157,8 +161,7 @@ build() {
@@ -167,8 +171,7 @@ build() {
mkdir -p usr/share/licenses/rust
mv -t usr/share/licenses/rust usr/share/doc/rust/{COPYRIGHT,LICENSE*}

Expand All @@ -114,7 +132,7 @@ index 33307ea..9a63d1a 100644
_pick dest-wasm usr/lib/rustlib/wasm32-*
_pick dest-src usr/lib/rustlib/src
}
@@ -173,19 +176,6 @@ package_rust() {
@@ -183,19 +186,6 @@ package_rust() {
cp -a dest-rust/* "$pkgdir"
}

Expand Down

0 comments on commit 5fec795

Please sign in to comment.