Browse Source

Use riscv32imc for Rust core crate

Some other crates have issues with riscv32i.
pull/1/head
parent
commit
2c3fc22963
  1. 6
      compilers/rust-riscv32imc-crates.nix
  2. 2
      derivations.nix

6
compilers/rust-riscv32i-crates.nix → compilers/rust-riscv32imc-crates.nix

@ -8,12 +8,12 @@ let
};
in
stdenv.mkDerivation {
name = "rust-riscv32i-crates";
name = "rust-riscv32imc-crates";
src = rustc.src;
phases = [ "unpackPhase" "buildPhase" ];
buildPhase = ''
destdir=$out/lib/rustlib/riscv32imac-unknown-none-elf/lib/
rustc="${rustc}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target riscv32i-unknown-none-elf -g -C opt-level=s --crate-type rlib"
destdir=$out/lib/rustlib/riscv32imc-unknown-none-elf/lib/
rustc="${rustc}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target riscv32imc-unknown-none-elf -g -C opt-level=s --crate-type rlib"
mkdir -p ''${destdir}
export RUSTC_BOOTSTRAP=1

2
derivations.nix

@ -30,5 +30,5 @@ rec {
pkgsBuildHost = pkgs.pkgsBuildHost // { inherit llvm_7; };
pkgsBuildTarget = pkgs.pkgsBuildTarget // { inherit llvm_7; };
};
rust-riscv32i-crates = pkgs.callPackage ./compilers/rust-riscv32i-crates.nix { inherit rustc; };
rust-riscv32imc-crates = pkgs.callPackage ./compilers/rust-riscv32imc-crates.nix { inherit rustc; };
}
Loading…
Cancel
Save