From 12371a51e647a00b90fe250837f056642125c095 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 20 Feb 2022 20:32:52 -0800 Subject: lib/systems: add mips64el definitions MIPS has a large space of {architecture,abi,endianness}; this commit adds all of them to lib/systems/platforms.nix so we can be done with it. Currently lib/systems/inspect.nix has a single "isMips" predicate, which is a bit ambiguous now that we will have both mips32 and mips64 support, with the latter having two ABIs. Let's add four new predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and treat the now-ambiguous isMips as deprecated in favor of the more-specific predicates. These predicates are used mainly for enabling/disabling target-specific workarounds, and it is extremely rare that a platform-specific workaround is needed, and both mips32 and mips64 need exactly the same workaround. The separate predicates (isMips64n32 and isMips64n64) for ABI distinctions are, unfortunately, useful. Boost's user-scheduled threading (used by nix) does does not currently supports mips64n32, which is a very desirable ABI on routers since they rarely have more than 2**32 bytes of DRAM. --- pkgs/stdenv/default.nix | 1 + pkgs/stdenv/linux/make-bootstrap-tools-cross.nix | 2 ++ 2 files changed, 3 insertions(+) (limited to 'pkgs/stdenv') diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix index 0d328d98ba11..25a593c67437 100644 --- a/pkgs/stdenv/default.nix +++ b/pkgs/stdenv/default.nix @@ -53,6 +53,7 @@ in armv8m-linux = stagesLinux; aarch64-linux = stagesLinux; mipsel-linux = stagesLinux; + mips64el-linux = stagesLinux; powerpc-linux = /* stagesLinux */ stagesNative; powerpc64-linux = stagesLinux; powerpc64le-linux = stagesLinux; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index d8ab96952b7f..a21f677f117c 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -17,6 +17,8 @@ in lib.mapAttrs (n: make) (with lib.systems.examples; { armv6l-musl = muslpi; aarch64-musl = aarch64-multiplatform-musl; riscv64 = riscv64; + mips64el-linux-gnuabin32 = lib.systems.platforms.mips64el-linux-gnuabin32; + mips64el-linux-gnuabi64 = lib.systems.platforms.mips64el-linux-gnuabi64; powerpc64 = ppc64; powerpc64-musl = ppc64-musl; powerpc64le = powernv; -- cgit 1.4.1