1 # These can be passed to nixpkgs as either the `localSystem` or
2 # `crossSystem`. They are put here for user convenience, but also used by cross
3 # tests and linux cross stdenv building, so handle with care!
6 platforms = import ./platforms.nix { inherit lib; };
9 config = "riscv${bits}-unknown-linux-gnu";
18 config = "powerpc64le-unknown-linux-gnu";
21 config = "powerpc64le-unknown-linux-musl";
25 config = "powerpc64-unknown-linux-gnuabielfv2";
28 config = "powerpc64-unknown-linux-musl";
29 gcc = { abi = "elfv2"; };
33 config = "armv5tel-unknown-linux-gnueabi";
34 } // platforms.sheevaplug;
37 config = "armv6l-unknown-linux-gnueabihf";
38 } // platforms.raspberrypi;
41 config = "aarch64-unknown-linux-gnu";
42 } // platforms.bluefield2;
45 config = "armv7l-unknown-linux-gnueabihf";
46 } // platforms.zero-gravitas;
49 config = "armv7l-unknown-linux-gnueabihf";
50 } // platforms.zero-sugar;
52 armv7l-hf-multiplatform = {
53 config = "armv7l-unknown-linux-gnueabihf";
56 aarch64-multiplatform = {
57 config = "aarch64-unknown-linux-gnu";
60 armv7a-android-prebuilt = {
61 config = "armv7a-unknown-linux-androideabi";
62 rust.rustcTarget = "armv7-linux-androideabi";
63 androidSdkVersion = "33";
64 androidNdkVersion = "26";
65 useAndroidPrebuilt = true;
66 } // platforms.armv7a-android;
68 aarch64-android-prebuilt = {
69 config = "aarch64-unknown-linux-android";
70 rust.rustcTarget = "aarch64-linux-android";
71 androidSdkVersion = "33";
72 androidNdkVersion = "26";
73 useAndroidPrebuilt = true;
77 config = "aarch64-unknown-linux-android";
78 androidSdkVersion = "33";
79 androidNdkVersion = "26";
81 useAndroidPrebuilt = false;
86 config = "armv5tel-unknown-linux-gnueabi";
87 } // platforms.pogoplug4;
90 config = "mipsel-unknown-linux-uclibc";
91 } // platforms.ben_nanonote;
94 config = "mipsel-unknown-linux-gnu";
95 } // platforms.fuloong2f_n32;
97 # can execute on 32bit chip
98 mips-linux-gnu = { config = "mips-unknown-linux-gnu"; } // platforms.gcc_mips32r2_o32;
99 mipsel-linux-gnu = { config = "mipsel-unknown-linux-gnu"; } // platforms.gcc_mips32r2_o32;
101 # require 64bit chip (for more registers, 64-bit floating point, 64-bit "long long") but use 32bit pointers
102 mips64-linux-gnuabin32 = { config = "mips64-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32;
103 mips64el-linux-gnuabin32 = { config = "mips64el-unknown-linux-gnuabin32"; } // platforms.gcc_mips64r2_n32;
106 mips64-linux-gnuabi64 = { config = "mips64-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r2_64;
107 mips64el-linux-gnuabi64 = { config = "mips64el-unknown-linux-gnuabi64"; } // platforms.gcc_mips64r2_64;
109 muslpi = raspberryPi // {
110 config = "armv6l-unknown-linux-musleabihf";
113 aarch64-multiplatform-musl = {
114 config = "aarch64-unknown-linux-musl";
117 gnu64 = { config = "x86_64-unknown-linux-gnu"; };
118 gnu64_simplekernel = gnu64 // platforms.pc_simplekernel; # see test/cross/default.nix
119 gnu32 = { config = "i686-unknown-linux-gnu"; };
121 musl64 = { config = "x86_64-unknown-linux-musl"; };
122 musl32 = { config = "i686-unknown-linux-musl"; };
124 riscv64 = riscv "64";
125 riscv32 = riscv "32";
128 config = "riscv64-none-elf";
133 config = "riscv32-none-elf";
138 config = "mips64-none-elf";
143 config = "mips-none-elf";
147 loongarch64-linux = {
148 config = "loongarch64-unknown-linux-gnu";
152 config = "mmix-unknown-mmixware";
157 config = "rx-none-elf";
162 config = "msp430-elf";
181 config = "m68k-unknown-linux-gnu";
185 config = "s390-unknown-linux-gnu";
189 config = "s390x-unknown-linux-gnu";
193 config = "arm-none-eabi";
197 config = "arm-none-eabihf";
199 # GCC8+ does not build without this
200 # (https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg552339.html):
208 config = "aarch64-none-elf";
210 rust.rustcTarget = "aarch64-unknown-none";
213 aarch64be-embedded = {
214 config = "aarch64_be-none-elf";
219 config = "powerpc-none-eabi";
224 config = "powerpcle-none-eabi";
234 config = "x86_64-elf";
238 microblaze-embedded = {
239 config = "microblazeel-none-elf";
247 x86_64-unknown-redox = {
248 config = "x86_64-unknown-redox";
257 config = "aarch64-apple-ios";
258 # config = "aarch64-apple-darwin14";
259 darwinSdkVersion = "14.3";
261 xcodePlatform = "iPhoneOS";
262 useiOSPrebuilt = true;
266 config = "armv7a-apple-ios";
267 # config = "arm-apple-darwin10";
268 darwinSdkVersion = "14.3";
270 xcodePlatform = "iPhoneOS";
271 useiOSPrebuilt = true;
274 iphone64-simulator = {
275 config = "x86_64-apple-ios";
276 # config = "x86_64-apple-darwin14";
277 darwinSdkVersion = "14.3";
279 xcodePlatform = "iPhoneSimulator";
280 darwinPlatform = "ios-simulator";
281 useiOSPrebuilt = true;
284 iphone32-simulator = {
285 config = "i686-apple-ios";
286 # config = "i386-apple-darwin11";
287 darwinSdkVersion = "14.3";
289 xcodePlatform = "iPhoneSimulator";
290 darwinPlatform = "ios-simulator";
291 useiOSPrebuilt = true;
295 config = "aarch64-apple-darwin";
296 xcodePlatform = "MacOSX";
301 config = "x86_64-apple-darwin";
302 xcodePlatform = "MacOSX";
312 config = "i686-w64-mingw32";
313 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
318 # That's the triplet they use in the mingw-w64 docs.
319 config = "x86_64-w64-mingw32";
320 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
324 config = "x86_64-w64-mingw32";
325 libc = "ucrt"; # This distinguishes the mingw (non posix) toolchain
331 config = "x86_64-unknown-freebsd";
336 config = "x86_64-unknown-netbsd";
339 # this is broken and never worked fully
340 x86_64-netbsd-llvm = {
341 config = "x86_64-unknown-netbsd";
346 config = "x86_64-unknown-openbsd";
355 config = "wasm32-unknown-wasi";
359 wasm32-unknown-none = {
360 config = "wasm32-unknown-none";
361 rust.rustcTarget = "wasm32-unknown-unknown";
367 # This triple is special to GHC/Cabal/GHCJS and not recognized by autotools
368 # See: https://gitlab.haskell.org/ghc/ghc/-/commit/6636b670233522f01d002c9b97827d00289dbf5c
369 # https://github.com/ghcjs/ghcjs/issues/53
370 config = "javascript-unknown-ghcjs";