diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/systems/doubles.nix | 3 | ||||
-rw-r--r-- | lib/systems/examples.nix | 5 | ||||
-rw-r--r-- | lib/systems/inspect.nix | 1 | ||||
-rw-r--r-- | lib/systems/parse.nix | 33 | ||||
-rw-r--r-- | lib/tests/systems.nix | 6 |
5 files changed, 32 insertions, 16 deletions
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index 517a7296afd2..d8bfc48a96f8 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -36,6 +36,8 @@ let "riscv64-none" "riscv32-none" "vc4-none" + "mmix-mmixware" + "js-ghcjs" "aarch64-genode" "i686-genode" "x86_64-genode" @@ -56,6 +58,7 @@ in { i686 = filterDoubles predicates.isi686; x86_64 = filterDoubles predicates.isx86_64; mips = filterDoubles predicates.isMips; + mmix = filterDoubles predicates.isMmix; riscv = filterDoubles predicates.isRiscV; vc4 = filterDoubles predicates.isVc4; js = filterDoubles predicates.isJavaScript; diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 87c05a0b0524..c869429d3ae7 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -109,6 +109,11 @@ rec { platform = platforms.riscv-multiplatform "32"; }; + mmix = { + config = "mmix-unknown-mmixware"; + libc = "newlib"; + }; + msp430 = { config = "msp430-elf"; libc = "newlib"; diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 8fa630572509..7adbc98f9a9d 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -17,6 +17,7 @@ rec { isAarch32 = { cpu = { family = "arm"; bits = 32; }; }; isAarch64 = { cpu = { family = "arm"; bits = 64; }; }; isMips = { cpu = { family = "mips"; }; }; + isMmix = { cpu = { family = "mmix"; }; }; isRiscV = { cpu = { family = "riscv"; }; }; isSparc = { cpu = { family = "sparc"; }; }; isWasm = { cpu = { family = "wasm"; }; }; diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 6bd44a007466..6ba3c40c665a 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -93,6 +93,8 @@ rec { mips64 = { bits = 64; significantByte = bigEndian; family = "mips"; }; mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; }; + mmix = { bits = 64; significantByte = bigEndian; family = "mmix"; }; + powerpc = { bits = 32; significantByte = bigEndian; family = "power"; }; powerpc64 = { bits = 64; significantByte = bigEndian; family = "power"; }; powerpc64le = { bits = 64; significantByte = littleEndian; family = "power"; }; @@ -268,19 +270,20 @@ rec { kernels = with execFormats; with kernelFamilies; setTypes types.openKernel { # TODO(@Ericson2314): Don't want to mass-rebuild yet to keeping 'darwin' as # the nnormalized name for macOS. - macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; }; - ios = { execFormat = macho; families = { inherit darwin; }; }; - freebsd = { execFormat = elf; families = { inherit bsd; }; }; - linux = { execFormat = elf; families = { }; }; - netbsd = { execFormat = elf; families = { inherit bsd; }; }; - none = { execFormat = unknown; families = { }; }; - openbsd = { execFormat = elf; families = { inherit bsd; }; }; - solaris = { execFormat = elf; families = { }; }; - wasi = { execFormat = wasm; families = { }; }; - redox = { execFormat = elf; families = { }; }; - windows = { execFormat = pe; families = { }; }; - ghcjs = { execFormat = unknown; families = { }; }; - genode = { execFormat = elf; families = { }; }; + macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; }; + ios = { execFormat = macho; families = { inherit darwin; }; }; + freebsd = { execFormat = elf; families = { inherit bsd; }; }; + linux = { execFormat = elf; families = { }; }; + netbsd = { execFormat = elf; families = { inherit bsd; }; }; + none = { execFormat = unknown; families = { }; }; + openbsd = { execFormat = elf; families = { inherit bsd; }; }; + solaris = { execFormat = elf; families = { }; }; + wasi = { execFormat = wasm; families = { }; }; + redox = { execFormat = elf; families = { }; }; + windows = { execFormat = pe; families = { }; }; + ghcjs = { execFormat = unknown; families = { }; }; + genode = { execFormat = elf; families = { }; }; + mmixware = { execFormat = unknown; families = { }; }; } // { # aliases # 'darwin' is the kernel for all of them. We choose macOS by default. darwin = kernels.macos; @@ -382,7 +385,7 @@ rec { else if (elemAt l 1) == "elf" then { cpu = elemAt l 0; vendor = "unknown"; kernel = "none"; abi = elemAt l 1; } else { cpu = elemAt l 0; kernel = elemAt l 1; }; - "3" = # Awkwards hacks, beware! + "3" = # Awkward hacks, beware! if elemAt l 1 == "apple" then { cpu = elemAt l 0; vendor = "apple"; kernel = elemAt l 2; } else if (elemAt l 1 == "linux") || (elemAt l 2 == "gnu") @@ -393,6 +396,8 @@ rec { then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "wasi"; } else if (elemAt l 2 == "redox") then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "redox"; } + else if (elemAt l 2 == "mmixware") + then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "mmixware"; } else if hasPrefix "netbsd" (elemAt l 2) then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; } else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"]) diff --git a/lib/tests/systems.nix b/lib/tests/systems.nix index f691b2da3165..eed7ee725bc4 100644 --- a/lib/tests/systems.nix +++ b/lib/tests/systems.nix @@ -11,12 +11,14 @@ let expr = lib.sort lib.lessThan x; expected = lib.sort lib.lessThan y; }; -in with lib.systems.doubles; lib.runTests { - testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ js ++ genode ++ redox); +in +with lib.systems.doubles; lib.runTests { + testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ mmix ++ js ++ genode ++ redox); testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv6l-none" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ]; testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-genode" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ]; testmips = mseteq mips [ "mipsel-linux" ]; + testmmix = mseteq mmix [ "mmix-mmixware" ]; testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-genode" "x86_64-redox" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ]; testcygwin = mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ]; |