Use riscv32imc for Rust core crate

Some other crates have issues with riscv32i.
This commit is contained in:
Sebastien Bourdeauducq 2019-06-05 23:06:03 +08:00
parent 14c7b4890c
commit 2c3fc22963
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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; };
}