about summary refs log tree commit diff
path: root/lib/systems
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-25 00:23:07 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-25 00:23:07 +0000
commit6bc456c91c6a556e905852d9a13034ed1932ea3d (patch)
tree69df19159e5e7df77ae939041f8f6e941c5ef056 /lib/systems
parentea9a2c5ec21bf088bbdef036238fa67cdc85b073 (diff)
parent4273a6adcc9327b9dc0e09e9fe205b4861c15679 (diff)
downloadnixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.tar
nixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.tar.gz
nixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.tar.bz2
nixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.tar.lz
nixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.tar.xz
nixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.tar.zst
nixlib-6bc456c91c6a556e905852d9a13034ed1932ea3d.zip
Merge remote-tracking branch 'upstream/master' into ghcjs-cross-without-cc
Diffstat (limited to 'lib/systems')
-rw-r--r--lib/systems/default.nix2
-rw-r--r--lib/systems/doubles.nix3
-rw-r--r--lib/systems/examples.nix6
-rw-r--r--lib/systems/inspect.nix1
-rw-r--r--lib/systems/parse.nix3
5 files changed, 14 insertions, 1 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 0c0cdf1f11b1..026117cc34fd 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -37,6 +37,7 @@ rec {
         else if final.isAndroid             then "bionic"
         else if final.isLinux /* default */ then "glibc"
         else if final.isMsp430              then "newlib"
+        else if final.isVc4                 then "newlib"
         else if final.isAvr                 then "avrlibc"
         else if final.isNetBSD              then "nblibc"
         # TODO(@Ericson2314) think more about other operating systems
@@ -79,6 +80,7 @@ rec {
         else if final.isAarch64 then "arm64"
         else if final.isx86_32 then "x86"
         else if final.isx86_64 then "ia64"
+        else if final.isMips then "mips"
         else final.parsed.cpu.name;
 
       qemuArch =
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix
index f07e9da33bcb..59bb095a28f5 100644
--- a/lib/systems/doubles.nix
+++ b/lib/systems/doubles.nix
@@ -26,7 +26,7 @@ let
 
     "riscv32-linux" "riscv64-linux"
 
-    "aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none"
+    "aarch64-none" "avr-none" "arm-none" "i686-none" "x86_64-none" "powerpc-none" "msp430-none" "riscv64-none" "riscv32-none" "vc4-none"
 
     "js-ghcjs"
   ];
@@ -47,6 +47,7 @@ in {
   x86_64  = filterDoubles predicates.isx86_64;
   mips    = filterDoubles predicates.isMips;
   riscv   = filterDoubles predicates.isRiscV;
+  vc4     = filterDoubles predicates.isVc4;
 
   cygwin  = filterDoubles predicates.isCygwin;
   darwin  = filterDoubles predicates.isDarwin;
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 585156c24759..cb8bc3de6c48 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -118,6 +118,12 @@ rec {
     config = "avr";
   };
 
+  vc4 = {
+    config = "vc4-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 8a983b3d3637..d1980c6dff81 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -21,6 +21,7 @@ rec {
     isSparc        = { cpu = { family = "sparc"; }; };
     isWasm         = { cpu = { family = "wasm"; }; };
     isMsp430       = { cpu = { family = "msp430"; }; };
+    isVc4          = { cpu = { family = "vc4"; }; };
     isAvr          = { cpu = { family = "avr"; }; };
     isAlpha        = { cpu = { family = "alpha"; }; };
     isJavaScript   = { cpu = cpuTypes.js; };
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index 5a3805cf997a..6a02dbb51528 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -112,6 +112,8 @@ rec {
     msp430   = { bits = 16; significantByte = littleEndian; family = "msp430"; };
     avr      = { bits = 8; family = "avr"; };
 
+    vc4      = { bits = 32; significantByte = littleEndian; family = "vc4"; };
+
     js       = { bits = 32; significantByte = littleEndian; family = "js"; };
   };
 
@@ -330,6 +332,7 @@ rec {
         }
       ];
     };
+    gnuabi64     = { abi = "64"; };
 
     musleabi     = { float = "soft"; };
     musleabihf   = { float = "hard"; };