# enable i686-unknown-linux-gnu target # and replace pentium4 (SSE2) with pentium3 (no SSE2) in the compiler spec file # # Also trying to reduce memory usage by building with # -debuginfo-level-std=1 # see https://github.com/rust-lang/rust/issues/60294 source+=(config.toml.patch) sha256sums+=('573b9869d71740aa5c7023670926600f5843d6e12480e3c9895caa37a4bc479c') eval "$( declare -f prepare | \ sed ' $ i patch -p1 -i "$srcdir/config.toml.patch" ' )" # stop insanity of nproc (see FS#62952) eval "$( declare -f build | \ sed ' s/-j "$(nproc)"/-j1/ ' )" if [ "${CARCH}" != 'pentium4' ]; then eval "$( declare -f prepare | \ sed ' $ i sed -i "s/pentium4/pentium3/g" "$srcdir/rustc-$pkgver-src/vendor/rustc-ap-rustc_target/src/spec/i686_unknown_linux_gnu.rs" $ i sed -i "s/pentium4/pentium3/g" "$srcdir/rustc-$pkgver-src/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs" $ i sed -i "s/87a043fd55d96d4bf471c7969df0912ccebdb1a5d52d157f4896af52f7af6d41/1c032d897011bc643fdb241251280d12c1b8cfd3ca3a31a8a2a107f8bf7dce13/g" "$srcdir/rustc-$pkgver-src/vendor/rustc-ap-rustc_target/.cargo-checksum.json" ' )" fi # Don't move lib32 support into rust32-lib, we are on 32-bit in the end # and don't draw a symlink to 64-bit libraries (but to 32-bit instead) # move rust-musl though, also patch architecture for musl accordingly eval "$( declare -f build | \ sed ' /mv.*i686-unknown-linux-gnu.*/d s/x86_64-unknown-linux-musl/i686-unknown-linux-musl/ ' )" eval "$( declare -f package_rust | \ sed ' /ln /s/x86_64-unknown-linux-gnu/i686-unknown-linux-gnu/g ' )" eval "$( declare -f package_rust-musl | \ sed ' s/x86_64-unknown-linux-musl/i686-unknown-linux-musl/ ' )" # remove 32-bit stuff (shouldn't that be removed automatically?) pkgname=( $( printf '%s\n' "${pkgname[@]}" | \ grep -v '^lib32-rust-libs' ) ) makedepends=(${makedepends[@]//lib32-gcc-libs/}) # Enable on demand, if your previous rust is broken use previous version # from build-support (this is preferable to using rust-bin below, but # requires all intermediate versions of rust to be built #makedepends=(${makedepends[@]//rust/}) #makedepends+=('rust148') # Enable on demand, if your previous rust is broken use previous version # from build-support #makedepends=(${makedepends[@]//rust/}) #makedepends+=('rust-bin') # rust 1.41 is built against llvm11.0, so force that in as a make dependency makedepends+=('llvm11-libs')