diff options
Diffstat (limited to 'lib/systems')
-rw-r--r-- | lib/systems/default.nix | 17 | ||||
-rw-r--r-- | lib/systems/doubles.nix | 2 | ||||
-rw-r--r-- | lib/systems/examples.nix | 9 | ||||
-rw-r--r-- | lib/systems/inspect.nix | 1 | ||||
-rw-r--r-- | lib/systems/parse.nix | 6 | ||||
-rw-r--r-- | lib/systems/platforms.nix | 2 |
6 files changed, 27 insertions, 10 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0729cc7ef293..d5a206e620c8 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -23,13 +23,15 @@ rec { config = parse.tripleFromSystem final.parsed; # Just a guess, based on `system` platform = platforms.selectBySystem final.system; + # Derived meta-data libc = - /**/ if final.isDarwin then "libSystem" - else if final.isMinGW then "msvcrt" - else if final.isMusl then "musl" - else if final.isLinux /* default */ then "glibc" + /**/ if final.isDarwin then "libSystem" + else if final.isMinGW then "msvcrt" + else if final.isMusl then "musl" + else if final.isAndroid then "bionic" + else if final.isLinux /* default */ then "glibc" # TODO(@Ericson2314) think more about other operating systems - else "native/impure"; + else "native/impure"; extensions = { sharedLibrary = /**/ if final.isDarwin then ".dylib" @@ -39,7 +41,10 @@ rec { /**/ if final.isWindows then ".exe" else ""; }; + # Misc boolean options + useAndroidPrebuilt = false; } // mapAttrs (n: v: v final.parsed) inspect.predicates // args; - in final; + in assert final.useAndroidPrebuilt -> final.isAndroid; + final; } diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index f39bfff13dec..20294a28a110 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -9,7 +9,7 @@ let "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" - "mips64el-linux" + "mipsel-linux" "i686-cygwin" "i686-freebsd" "i686-linux" "i686-netbsd" "i686-openbsd" diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index bd68ee9460e7..848737700b0b 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -38,6 +38,13 @@ rec { platform = platforms.aarch64-multiplatform; }; + aarch64-android-prebuilt = rec { + config = "aarch64-unknown-linux-android"; + arch = "aarch64"; + platform = platforms.aarch64-multiplatform; + useAndroidPrebuilt = true; + }; + scaleway-c1 = armv7l-hf-multiplatform // rec { platform = platforms.scaleway-c1; inherit (platform.gcc) fpu; @@ -51,7 +58,7 @@ rec { }; fuloongminipc = rec { - config = "mips64el-unknown-linux-gnu"; + config = "mipsel-unknown-linux-gnu"; arch = "mips"; float = "hard"; platform = platforms.fuloong2f_n32; diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index ff8f60001175..ab220af46e30 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -34,6 +34,7 @@ rec { Cygwin = { kernel = kernels.windows; abi = abis.cygnus; }; MinGW = { kernel = kernels.windows; abi = abis.gnu; }; + Android = [ { abi = abis.android; } { abi = abis.androideabi; } ]; Musl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ]; Kexecable = map (family: { kernel = kernels.linux; cpu.family = family; }) diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 95759b93ae08..03d052f5f192 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -75,7 +75,10 @@ rec { aarch64 = { bits = 64; significantByte = littleEndian; family = "aarch64"; }; i686 = { bits = 32; significantByte = littleEndian; family = "x86"; }; x86_64 = { bits = 64; significantByte = littleEndian; family = "x86"; }; - mips64el = { bits = 32; significantByte = littleEndian; family = "mips"; }; + mips = { bits = 32; significantByte = bigEndian; family = "mips"; }; + mipsel = { bits = 32; significantByte = littleEndian; family = "mips"; }; + mips64 = { bits = 64; significantByte = bigEndian; family = "mips"; }; + mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; }; powerpc = { bits = 32; significantByte = bigEndian; family = "power"; }; riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; }; riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; }; @@ -173,6 +176,7 @@ rec { types.abi = enum (attrValues abis); abis = setTypes types.openAbi { + android = {}; cygnus = {}; gnu = {}; msvc = {}; diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 9350a16017dd..f39e890fbf1c 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -561,6 +561,6 @@ rec { "armv6l-linux" = raspberrypi; "armv7l-linux" = armv7l-hf-multiplatform; "aarch64-linux" = aarch64-multiplatform; - "mips64el-linux" = fuloong2f_n32; + "mipsel-linux" = fuloong2f_n32; }.${system} or pcBase; } |