Skip to content

Commit

Permalink
extra/rust: Make work on systems with larger pages (1.59.0-1.1)
Browse files Browse the repository at this point in the history
jemalloc is broken by default on architectures like aarch64, where the
page size is not a constant (it requires compile-time page size >=
run-time page size). Force it to build for 64K pages, which should work
for all possible ARM systems.
  • Loading branch information
marcan committed Mar 15, 2022
1 parent 619fcc9 commit c2459a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extra/rust/PKGBUILD
Expand Up @@ -17,7 +17,7 @@ pkgbase=rust
pkgname=(rust rust-src)
epoch=1
pkgver=1.59.0
pkgrel=1
pkgrel=1.1
pkgdesc="Systems programming language focused on safety, speed and concurrency"
url=https://www.rust-lang.org/
arch=(x86_64)
Expand Down Expand Up @@ -139,6 +139,7 @@ _pick() {
build() {
cd rustc-$pkgver-src

export JEMALLOC_SYS_WITH_LG_PAGE=16
export RUST_BACKTRACE=1
export RUST_COMPILER_RT_ROOT="$srcdir/compiler-rt-$_llvm_ver.src"
[[ -d $RUST_COMPILER_RT_ROOT ]]
Expand Down

2 comments on commit c2459a0

@mipimipi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix tested with version 1.61.0 on M1: It's building, and rust packages can be built.

@mipimipi
Copy link

@mipimipi mipimipi commented on c2459a0 Jun 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tested the fix on "standard" aarch64 and armv7h: rust can be built and rust packages can be built with it. PR created.

Please sign in to comment.