From 955d032b47fbcbf8e366a3a8cdcea4ac5f7b63d7 Mon Sep 17 00:00:00 2001 From: oxalica Date: Sun, 3 Nov 2019 13:17:33 +0800 Subject: lib.systems: handle mips family properly --- lib/systems/default.nix | 5 +++++ lib/systems/parse.nix | 1 + 2 files changed, 6 insertions(+) (limited to 'lib/systems') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0c0cdf1f11b1..ccb928eace78 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -79,6 +79,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 = @@ -90,6 +91,10 @@ rec { powerpcle = "ppc"; powerpc64 = "ppc64"; powerpc64le = "ppc64le"; + mips = "mips"; + mipsel = "mipsel"; + mips64 = "mips64"; + mips64el = "mips64el"; }.${final.parsed.cpu.name} or final.parsed.cpu.name; emulator = pkgs: let diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 5e12df32ffdd..e923334a11bd 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -327,6 +327,7 @@ rec { } ]; }; + gnuabi64 = { abi = "64"; }; musleabi = { float = "soft"; }; musleabihf = { float = "hard"; }; -- cgit v1.2.3 From c98da738023ed72b78b5a4712c22f2350a7c0efb Mon Sep 17 00:00:00 2001 From: oxalica Date: Mon, 4 Nov 2019 12:13:30 +0800 Subject: lib.systems: remove redundant mapping --- lib/systems/default.nix | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/systems') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index ccb928eace78..0d51be4b23bc 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -91,10 +91,6 @@ rec { powerpcle = "ppc"; powerpc64 = "ppc64"; powerpc64le = "ppc64le"; - mips = "mips"; - mipsel = "mipsel"; - mips64 = "mips64"; - mips64el = "mips64el"; }.${final.parsed.cpu.name} or final.parsed.cpu.name; emulator = pkgs: let -- cgit v1.2.3 From 4aa1ffae041bb9c65eb3067e9dbaaa70710ed100 Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Sat, 2 Nov 2019 12:47:38 -0300 Subject: initial implementation of vc4 cross-compile --- lib/systems/default.nix | 1 + lib/systems/doubles.nix | 3 ++- lib/systems/examples.nix | 6 ++++++ lib/systems/inspect.nix | 1 + lib/systems/parse.nix | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/systems') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0d51be4b23bc..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 diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index 58cff18e6488..700c895b3aba 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" ]; allParsed = map parse.mkSystemFromString all; @@ -45,6 +45,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 362357446025..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"; }; }; -- cgit v1.2.3