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 rustc.config = "armv7-linux-androideabi";
65 useAndroidPrebuilt = true;
66 } // platforms.armv7a-android;
68 aarch64-android-prebuilt = {
69 config = "aarch64-unknown-linux-android";
70 rustc.config = "aarch64-linux-android";
73 useAndroidPrebuilt = true;
77 config = "aarch64-unknown-linux-android";
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 rustc.config = "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";
242 x86_64-unknown-redox = {
243 config = "x86_64-unknown-redox";
252 config = "aarch64-apple-ios";
253 # config = "aarch64-apple-darwin14";
256 xcodePlatform = "iPhoneOS";
257 useiOSPrebuilt = true;
261 config = "armv7a-apple-ios";
262 # config = "arm-apple-darwin10";
265 xcodePlatform = "iPhoneOS";
266 useiOSPrebuilt = true;
269 iphone64-simulator = {
270 config = "x86_64-apple-ios";
271 # config = "x86_64-apple-darwin14";
274 xcodePlatform = "iPhoneSimulator";
275 darwinPlatform = "ios-simulator";
276 useiOSPrebuilt = true;
279 iphone32-simulator = {
280 config = "i686-apple-ios";
281 # config = "i386-apple-darwin11";
284 xcodePlatform = "iPhoneSimulator";
285 darwinPlatform = "ios-simulator";
286 useiOSPrebuilt = true;
290 config = "aarch64-apple-darwin";
291 xcodePlatform = "MacOSX";
296 config = "x86_64-apple-darwin";
297 xcodePlatform = "MacOSX";
307 config = "i686-w64-mingw32";
308 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
313 # That's the triplet they use in the mingw-w64 docs.
314 config = "x86_64-w64-mingw32";
315 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
319 config = "x86_64-w64-mingw32";
320 libc = "ucrt"; # This distinguishes the mingw (non posix) toolchain
326 config = "x86_64-unknown-freebsd13";
331 config = "x86_64-unknown-netbsd";
334 # this is broken and never worked fully
335 x86_64-netbsd-llvm = {
336 config = "x86_64-unknown-netbsd";
345 config = "wasm32-unknown-wasi";
351 # This triple is special to GHC/Cabal/GHCJS and not recognized by autotools
352 # See: https://gitlab.haskell.org/ghc/ghc/-/commit/6636b670233522f01d002c9b97827d00289dbf5c
353 # https://github.com/ghcjs/ghcjs/issues/53
354 config = "javascript-unknown-ghcjs";