stdenv: Bringup aarch64 architecture support

This commit is contained in:
Tuomas Tynkkynen
2016-02-05 00:47:23 +02:00
parent 41fd1ed903
commit 7c8a060c09
7 changed files with 38 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
"armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
"armv6l-linux" = import ./bootstrap-files/armv6l.nix;
"armv7l-linux" = import ./bootstrap-files/armv7l.nix;
"aarch64-linux" = import ./bootstrap-files/aarch64.nix;
"mips64el-linux" = import ./bootstrap-files/loongson2f.nix;
}.${localSystem.system}
or (abort "unsupported platform for the pure Linux stdenv")

View File

@@ -50,10 +50,23 @@ let
};
};
aarch64-multiplatform-crossSystem = {
crossSystem = rec {
config = "aarch64-linux-gnu";
bigEndian = false;
arch = "aarch64";
withTLS = true;
libc = "glibc";
platform = pkgsNoParams.platforms.aarch64-multiplatform;
inherit (platform) gcc;
};
};
selectedCrossSystem =
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
if toolsArch == "armv6l" then raspberrypiCrossSystem else
if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else null;
if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else
if toolsArch == "aarch64" then aarch64-multiplatform-crossSystem else null;
pkgsUnspliced = pkgsFun ({inherit system;} // selectedCrossSystem);
pkgs = pkgsUnspliced.splicedPackages;
@@ -265,4 +278,5 @@ rec {
armv5tel = buildFor "armv5tel";
armv6l = buildFor "armv6l";
armv7l = buildFor "armv7l";
aarch64 = buildFor "aarch64";
}