# 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+=('42e861ba90335d0e2e666e10b12d9ff85ea1bdb711176fb3c09e92375e193660') eval "$( declare -f prepare | \ sed ' $ i patch -p1 -i "$srcdir/config.toml.patch" ' )" # stop insanity of nproc (see FS#62952) eval "$( declare -f package_rust | \ 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/spec/i686_unknown_linux_gnu.rs" $ i sed -i "s/pentium4/pentium3/g" "$srcdir/rustc-$pkgver-src/src/librustc_target/spec/i686_unknown_linux_gnu.rs" $ i sed -i "s/a75a6025d7e3424edf9baf3039056c0f8eea157631a175d00ac5a218aa54b510/484bf8be15015b330fa9a97b6dabb8c7627e59d5cddb2dd0e83478749f8aabad/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) pkgname=( $( printf '%s\n' "${pkgname[@]}" | \ grep -v '^lib32-rust-libs' ) ) eval "$( declare -f package_rust | \ sed ' /mv.*i686-unknown-linux-gnu.*/d /ln /s/x86_64-unknown-linux-gnu/i686-unknown-linux-gnu/g ' )" # watch for files changing which need patching during the x.py craziness! # currently this is duplicate U1024 and P1024 types (this is currently needed # for i686 and 1.38.0) source+=('watcher.sh') sha256sums+=('a37ef742e079c7f7e80297bdb97115808b48f77fd92571468853de5cbd7ee800') if [ "${CARCH}" = "i686" ]; then makedepends+=('inotify-tools' 'procps-ng') eval "$( declare -f package_rust | \ sed ' /.\/x.py/ i \ "$srcdir/watcher.sh" "$srcdir" & \ _kill_pid=$! \ sleep 10 /.\/x.py/ a \ kill $_kill_pid ' )" fi # Enable on demand, if your previous rust is broken, see also build-support and AUR # for rust-bin. #makedepends=(${makedepends[@]//rust/}) #makedepends+=('rust-bin') # links run away in upstream rust, we take extra and not trunk, is fixed in trunk upstream source[2]="http://releases.llvm.org/$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz" source[3]="http://releases.llvm.org/$_llvm_ver/compiler-rt-$_llvm_ver.src.tar.xz.sig" sha256sums[2]="56e4cd96dd1d8c346b07b4d6b255f976570c6f2389697347a6c3dcb9e820d10e"