diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD index efa3109b6de9ac2288c7af9e56fa1a7c37463998..f2e355b585c72aa9711df612e9c72ce07f5d4365 100644 --- a/community/rust/APKBUILD +++ b/community/rust/APKBUILD @@ -8,7 +8,7 @@ pkgname=rust pkgver=1.69.0 _llvmver=16 _bootver=1.68.0 -pkgrel=8 +pkgrel=9 pkgdesc="The Rust Programming Language" url="https://www.rust-lang.org/" arch="all" @@ -46,7 +46,6 @@ makedepends_build=" " makedepends_host=" curl-dev - jemalloc-dev libssh2-dev llvm$_llvmver-dev openssl-dev @@ -114,6 +113,22 @@ builddir="$srcdir/rustc-$pkgver-src" # 1.26.0-r0: # - CVE-2019-16760 +if [ -z "$BOOTSTRAP" ]; then + case "$CARCH" in + s390x) ;; + *) + makedepends_build=" + $makedepends_build + patchelf + " + makedepends_host=" + $makedepends_host + scudo-malloc + " + ;; + esac +fi + # We have to add new arches in multiple steps: # 1. Compile with the upstream triplets, compiling alpine's triplets in # 2. Compile again, now with our triplets selected as build/target, now that @@ -304,8 +319,22 @@ package() { fi # for some reason the tar archive gets some root-only files for rlibs - find "$pkgdir"/usr/lib/rustlib -type f -perm -600 -exec chmod 644 {} \; - find "$pkgdir"/usr/lib/rustlib -type f -perm -700 -exec chmod 755 {} \; + find "$pkgdir"/usr/lib/rustlib -type f -perm -600 -exec chmod 644 {} \+ + find "$pkgdir"/usr/lib/rustlib -type f -perm -700 -exec chmod 755 {} \+ + + if [ -z "$BOOTSTRAP" ]; then + case "$CARCH" in + s390x) ;; + *) + # link scudo to tools by default on supported arches + # this is roughly 20+% faster with no downside + patchelf --add-needed=libscudo.so \ + "$pkgdir"/usr/bin/cargo \ + "$pkgdir"/usr/bin/rustc \ + "$pkgdir"/usr/bin/rustdoc + ;; + esac + fi } wasm() {