diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-18 00:09:25 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-18 00:09:25 -0500 |
commit | e288febee0809db7c594ceb42e655dd5d43a6369 (patch) | |
tree | b05498dd2dd238358b5017625746209530215875 | |
parent | 5be93a588335082d0610c739067035dfc1ddd260 (diff) | |
download | nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.tar nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.tar.gz nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.tar.bz2 nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.tar.lz nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.tar.xz nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.tar.zst nixpkgs-e288febee0809db7c594ceb42e655dd5d43a6369.zip |
Add riscv{32,64} crossSystems.
-rw-r--r-- | lib/systems/examples.nix | 8 | ||||
-rw-r--r-- | lib/systems/platforms.nix | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index f5562e28a09..bd68ee9460e 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -68,6 +68,14 @@ rec { musl64 = { config = "x86_64-unknown-linux-musl"; }; musl32 = { config = "i686-unknown-linux-musl"; }; + riscv = bits: { + config = "riscv${bits}-unknown-linux-gnu"; + platform = platforms.riscv-multiplatform bits; + }; + riscv64 = riscv "64"; + riscv32 = riscv "32"; + + # # Darwin # diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 58a7afa7679..3106c05dd5d 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -541,6 +541,12 @@ rec { }; }; + riscv-multiplatform = bits: { + name = "riscv-multiplatform"; + kernelArch = "riscv"; + bfdEmulation = "elf${bits}lriscv"; + }; + selectBySystem = system: { "i686-linux" = pc32; "x86_64-linux" = pc64; |