From 8929989614589ee3acd070a6409b2b9700c92d65 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 29 Nov 2020 00:01:14 +0000 Subject: lib: Clean up how linux and gcc config is specified The `platform` field is pointless nesting: it's just stuff that happens to be defined together, and that should be an implementation detail. This instead makes `linux-kernel` and `gcc` top level fields in platform configs. They join `rustc` there [all are optional], which was put there and not in `platform` in anticipation of a change like this. `linux-kernel.arch` in particular also becomes `linuxArch`, to match the other `*Arch`es. The next step after is this to combine the *specific* machines from `lib.systems.platforms` with `lib.systems.examples`, keeping just the "multiplatform" ones for defaulting. --- lib/systems/examples.nix | 48 ++++++++++-------------------------------------- 1 file changed, 10 insertions(+), 38 deletions(-) (limited to 'lib/systems/examples.nix') diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 16002450f2d..de12e0b83c1 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -7,7 +7,6 @@ let riscv = bits: { config = "riscv${bits}-unknown-linux-gnu"; - platform = platforms.riscv-multiplatform; }; in @@ -17,84 +16,68 @@ rec { # powernv = { config = "powerpc64le-unknown-linux-gnu"; - platform = platforms.powernv; }; musl-power = { config = "powerpc64le-unknown-linux-musl"; - platform = platforms.powernv; }; sheevaplug = { config = "armv5tel-unknown-linux-gnueabi"; - platform = platforms.sheevaplug; - }; + } // platforms.sheevaplug; raspberryPi = { config = "armv6l-unknown-linux-gnueabihf"; - platform = platforms.raspberrypi; - }; + } // platforms.raspberrypi; remarkable1 = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.zero-gravitas; - }; + } // platforms.zero-gravitas; remarkable2 = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.zero-sugar; - }; + } // platforms.zero-sugar; armv7l-hf-multiplatform = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.armv7l-hf-multiplatform; }; aarch64-multiplatform = { config = "aarch64-unknown-linux-gnu"; - platform = platforms.aarch64-multiplatform; }; armv7a-android-prebuilt = { config = "armv7a-unknown-linux-androideabi"; sdkVer = "29"; ndkVer = "21"; - platform = platforms.armv7a-android; useAndroidPrebuilt = true; - }; + } // platforms.armv7a-android; aarch64-android-prebuilt = { config = "aarch64-unknown-linux-android"; sdkVer = "29"; ndkVer = "21"; - platform = platforms.aarch64-multiplatform; useAndroidPrebuilt = true; }; - scaleway-c1 = armv7l-hf-multiplatform // rec { - platform = platforms.scaleway-c1; - inherit (platform.gcc) fpu; - }; + scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1; pogoplug4 = { config = "armv5tel-unknown-linux-gnueabi"; - platform = platforms.pogoplug4; - }; + } // platforms.pogoplug4; ben-nanonote = { config = "mipsel-unknown-linux-uclibc"; - platform = platforms.ben_nanonote; - }; + } // platforms.ben_nanonote; fuloongminipc = { config = "mipsel-unknown-linux-gnu"; - platform = platforms.fuloong2f_n32; - }; + } // platforms.fuloong2f_n32; muslpi = raspberryPi // { config = "armv6l-unknown-linux-musleabihf"; }; - aarch64-multiplatform-musl = aarch64-multiplatform // { + aarch64-multiplatform-musl = { config = "aarch64-unknown-linux-musl"; }; @@ -110,13 +93,11 @@ rec { riscv64-embedded = { config = "riscv64-none-elf"; libc = "newlib"; - platform = platforms.riscv-multiplatform; }; riscv32-embedded = { config = "riscv32-none-elf"; libc = "newlib"; - platform = platforms.riscv-multiplatform; }; mmix = { @@ -136,13 +117,11 @@ rec { vc4 = { config = "vc4-elf"; libc = "newlib"; - platform = {}; }; or1k = { config = "or1k-elf"; libc = "newlib"; - platform = {}; }; arm-embedded = { @@ -204,7 +183,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; - platform = {}; }; iphone32 = { @@ -214,7 +192,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; - platform = {}; }; iphone64-simulator = { @@ -224,7 +201,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; - platform = {}; }; iphone32-simulator = { @@ -234,7 +210,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; - platform = {}; }; # @@ -245,7 +220,6 @@ rec { mingw32 = { config = "i686-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - platform = {}; }; # 64 bit mingw-w64 @@ -253,7 +227,6 @@ rec { # That's the triplet they use in the mingw-w64 docs. config = "x86_64-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - platform = {}; }; # BSDs @@ -275,6 +248,5 @@ rec { # Ghcjs ghcjs = { config = "js-unknown-ghcjs"; - platform = {}; }; } -- cgit 1.4.1