about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorMatthew Bauer <matthew.bauer@obsidian.systems>2018-07-28 12:29:02 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-02-26 15:55:47 -0500
commitaab8c7ba437d240bd9780e09489e7358fee180e2 (patch)
treeaa9f728c9750b5b86effef7830bf4a575fa53c16 /lib
parent1b2675213cd3e59a0a71a60529cc110ac80dd4a3 (diff)
netbsd: add cross target
Diffstat (limited to 'lib')
-rw-r--r--lib/systems/default.nix1
-rw-r--r--lib/systems/examples.nix7
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 77f200952958b..6e83546ae8e7b 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -33,6 +33,7 @@ rec {
         else if final.isAndroid             then "bionic"
         else if final.isLinux /* default */ then "glibc"
         else if final.isAvr                 then "avrlibc"
+        else if final.isNetBSD              then "nblibc"
         # TODO(@Ericson2314) think more about other operating systems
         else                                     "native/impure";
       extensions = {
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index ac1633a1a15f6..0c9a3b4a63f55 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -212,4 +212,11 @@ rec {
     libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
     platform = {};
   };
+
+  # BSDs
+
+  amd64-netbsd = {
+    config = "x86_64-unknown-netbsd";
+    libc = "nblibc";
+  };
 }