Skip to content

Instantly share code, notes, and snippets.

@InternetUnexplorer
Created December 28, 2021 22:03
Show Gist options
  • Save InternetUnexplorer/e2f6d758bb9ee9fa39ef97cbb98dd71d to your computer and use it in GitHub Desktop.
Save InternetUnexplorer/e2f6d758bb9ee9fa39ef97cbb98dd71d to your computer and use it in GitHub Desktop.
Nix derivation for an rv32i/ilp32 cross compiler
# nix profile install -f cross-compiler.nix
let
pkgs = import <nixpkgs> {
crossSystem = {
config = "riscv32-none-elf";
libc = "newlib";
gcc.abi = "ilp32";
gcc.arch = "rv32i";
};
};
in pkgs.symlinkJoin {
name = "riscv32-embedded-ilp32";
paths = [ pkgs.stdenv.cc pkgs.stdenv.cc.bintools ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment