diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2017-05-23 18:04:15 -0400 |
---|---|---|
committer | John Ericson <Ericson2314@Yahoo.com> | 2017-05-29 18:56:03 -0400 |
commit | 20e756a0936fb75ce8f9d9ef0b7a511198bf7eea (patch) | |
tree | efe83f0252c5097c00fff2d67afc90c9d6dd7b42 /pkgs/stdenv | |
parent | b20f20d3eb80de83abe5047c2ada9abad54ae0b6 (diff) | |
download | nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.tar nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.tar.gz nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.tar.bz2 nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.tar.lz nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.tar.xz nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.tar.zst nixlib-20e756a0936fb75ce8f9d9ef0b7a511198bf7eea.zip |
lib: Consolidate platform configurations (used for crossSystem)
This is good for maintenance and education.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/linux/make-bootstrap-tools-cross.nix | 94 |
1 files changed, 11 insertions, 83 deletions
diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index 50fd563e7c2f..0378891b27ab 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -6,91 +6,19 @@ let lib = import ../../../lib; pkgsFun = import ../../..; - sheevaplugCrossSystem = { - crossSystem = rec { - config = "arm-linux-gnueabi"; - bigEndian = false; - arch = "armv5te"; - float = "soft"; - withTLS = true; - libc = "glibc"; - platform = lib.systems.platforms.sheevaplug; - openssl.system = "linux-generic32"; - inherit (platform) gcc; - }; - }; - - raspberrypiCrossSystem = { - crossSystem = rec { - config = "arm-linux-gnueabihf"; - bigEndian = false; - arch = "armv6"; - float = "hard"; - fpu = "vfp"; - withTLS = true; - libc = "glibc"; - platform = lib.systems.platforms.raspberrypi; - openssl.system = "linux-generic32"; - inherit (platform) gcc; - }; - }; - - armv7l-hf-multiplatform-crossSystem = { - crossSystem = rec { - config = "arm-linux-gnueabihf"; - bigEndian = false; - arch = "armv7-a"; - float = "hard"; - fpu = "vfpv3-d16"; - withTLS = true; - libc = "glibc"; - platform = lib.systems.platforms.armv7l-hf-multiplatform; - openssl.system = "linux-generic32"; - inherit (platform) gcc; - }; - }; - - aarch64-multiplatform-crossSystem = { - crossSystem = rec { - config = "aarch64-linux-gnu"; - bigEndian = false; - arch = "aarch64"; - withTLS = true; - libc = "glibc"; - platform = lib.systems.platforms.aarch64-multiplatform; - inherit (platform) gcc; - }; - }; - - scaleway-c1-crossSystem.crossSystem = armv7l-hf-multiplatform-crossSystem.crossSystem // rec { - platform = lib.systems.platforms.scaleway-c1; - inherit (platform) gcc; - inherit (gcc) fpu; - }; - - pogoplug4-crossSystem.crossSystem = { - arch = "armv5tel"; - config = "armv5tel-softfloat-linux-gnueabi"; - float = "soft"; - - platform = lib.systems.platforms.pogoplug4; - - inherit (lib.systems.platforms.pogoplug4) gcc; - libc = "glibc"; - - withTLS = true; - openssl.system = "linux-generic32"; - }; + inherit (lib.systems.examples) + sheevaplug raspberryPi armv7l-hf-multiplatform + aarch64-multiplatform scaleway-c1 pogoplug4; selectedCrossSystem = - if toolsArch == "armv5tel" then sheevaplugCrossSystem else - if toolsArch == "scaleway" then scaleway-c1-crossSystem else - if toolsArch == "pogoplug4" then pogoplug4-crossSystem else - if toolsArch == "armv6l" then raspberrypiCrossSystem else - if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else - if toolsArch == "aarch64" then aarch64-multiplatform-crossSystem else null; - - pkgs = pkgsFun ({inherit system;} // selectedCrossSystem); + if toolsArch == "armv5tel" then sheevaplug else + if toolsArch == "scaleway" then scaleway-c1 else + if toolsArch == "pogoplug4" then pogoplug4 else + if toolsArch == "armv6l" then raspberryPi else + if toolsArch == "armv7l" then armv7l-hf-multiplatform else + if toolsArch == "aarch64" then aarch64-multiplatform else null; + + pkgs = pkgsFun ({ inherit system; crossSystem = selectedCrossSystem; }); glibc = pkgs.libcCross; bash = pkgs.bash; |