diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2020-11-09 15:06:44 -0500 |
---|---|---|
committer | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2020-11-09 22:32:11 -0500 |
commit | 6d8327ea96621b2d03aceee63df4fcdeea73e13a (patch) | |
tree | 5e168c459160d147cf280784e9e826ee3cc92dca | |
parent | 32fdf2118ce78744e30dd512c1d5a13ae2eb03f2 (diff) | |
download | nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.tar nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.tar.gz nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.tar.bz2 nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.tar.lz nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.tar.xz nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.tar.zst nixpkgs-6d8327ea96621b2d03aceee63df4fcdeea73e13a.zip |
Initial support for OpenRISC 1000 (or1k)
-rw-r--r-- | lib/systems/doubles.nix | 2 | ||||
-rw-r--r-- | lib/systems/examples.nix | 6 | ||||
-rw-r--r-- | lib/systems/inspect.nix | 1 | ||||
-rw-r--r-- | lib/systems/parse.nix | 2 | ||||
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 1 |
5 files changed, 12 insertions, 0 deletions
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index 517a7296afd..5cd203efc4a 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -35,6 +35,7 @@ let "msp430-none" "riscv64-none" "riscv32-none" "vc4-none" + "or1k-none" "js-ghcjs" @@ -58,6 +59,7 @@ in { mips = filterDoubles predicates.isMips; riscv = filterDoubles predicates.isRiscV; vc4 = filterDoubles predicates.isVc4; + or1k = filterDoubles predicates.isOr1k; js = filterDoubles predicates.isJavaScript; bigEndian = filterDoubles predicates.isBigEndian; diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 87c05a0b052..9a813b14cc2 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -124,6 +124,12 @@ rec { platform = {}; }; + or1k = { + config = "or1k-elf"; + libc = "newlib"; + platform = {}; + }; + arm-embedded = { config = "arm-none-eabi"; libc = "newlib"; diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 8fa63057250..ac483941dd2 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -24,6 +24,7 @@ rec { isVc4 = { cpu = { family = "vc4"; }; }; isAvr = { cpu = { family = "avr"; }; }; isAlpha = { cpu = { family = "alpha"; }; }; + isOr1k = { cpu = { family = "or1k"; }; }; isJavaScript = { cpu = cpuTypes.js; }; is32bit = { cpu = { bits = 32; }; }; diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 6bd44a00746..eadeb38c723 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -114,6 +114,8 @@ rec { vc4 = { bits = 32; significantByte = littleEndian; family = "vc4"; }; + or1k = { bits = 32; significantByte = bigEndian; family = "or1k"; }; + js = { bits = 32; significantByte = littleEndian; family = "js"; }; }; diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 786f0f9c598..b9cdd0b1b2e 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -185,6 +185,7 @@ stdenv.mkDerivation { else if targetPlatform.isAvr then "avr" else if targetPlatform.isAlpha then "alpha" else if targetPlatform.isVc4 then "vc4" + else if targetPlatform.isOr1k then "or1k" else throw "unknown emulation for platform: ${targetPlatform.config}"; in if targetPlatform.useLLVM or false then "" else targetPlatform.platform.bfdEmulation or (fmt + sep + arch); |