summary refs log tree commit diff
path: root/lib/systems/examples.nix
diff options
context:
space:
mode:
authorAdam Joseph2022-02-20 20:32:52 -0800
committerAdam Joseph2022-03-10 20:30:16 -0800
commit12371a51e647a00b90fe250837f056642125c095 (patch)
tree7e46578a84ceb08b250e61be1516e3478c79b511 /lib/systems/examples.nix
parentb77a575dc8f825eb82d6a916fe01fe953d93033e (diff)
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.
Diffstat (limited to 'lib/systems/examples.nix')
-rw-r--r--lib/systems/examples.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 9c0c91617e8a..9cac909093d6 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -93,6 +93,10 @@ rec {
     config = "mipsel-unknown-linux-gnu";
   } // platforms.fuloong2f_n32;
 
+  mips64el-linux-gnuabin32      = platforms.mips64el-linux-gnuabin32;
+  mips64el-linux-gnuabi64       = platforms.mips64el-linux-gnuabi64  // { rustc.config = "mips64el-unknown-linux-gnuabi64"; };
+  mips64el-qemu-linux-gnuabi64  = platforms.mips64el-qemu-linux-gnuabi64;
+
   muslpi = raspberryPi // {
     config = "armv6l-unknown-linux-musleabihf";
   };