summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-02-05 00:47:23 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-01-25 00:01:51 +0200
commit7c8a060c09799eb2ee70c00aa695ff08e5f07c6f (patch)
treed346e6bc9c7b2bf20d8c2240a66a2ff91fdaedfc /pkgs/stdenv
parent41fd1ed90346a3d7f6b067301ac9e147ef4dcd5e (diff)
downloadnixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.tar
nixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.tar.gz
nixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.tar.bz2
nixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.tar.lz
nixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.tar.xz
nixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.tar.zst
nixlib-7c8a060c09799eb2ee70c00aa695ff08e5f07c6f.zip
stdenv: Bringup aarch64 architecture support
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/default.nix1
-rw-r--r--pkgs/stdenv/generic/default.nix2
-rw-r--r--pkgs/stdenv/linux/default.nix1
-rw-r--r--pkgs/stdenv/linux/make-bootstrap-tools-cross.nix16
4 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index 78dbde13b89d..098caca0d890 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -44,6 +44,7 @@ in
     "armv5tel-linux" = stagesLinux;
     "armv6l-linux" = stagesLinux;
     "armv7l-linux" = stagesLinux;
+    "aarch64-linux" = stagesLinux;
     "mips64el-linux" = stagesLinux;
     "powerpc-linux" = /* stagesLinux */ stagesNative;
     "x86_64-darwin" = stagesDarwin;
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 269d7ef893a1..2010e35f58a3 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -311,6 +311,7 @@ let
              || system == "armv5tel-linux"
              || system == "armv6l-linux"
              || system == "armv7l-linux"
+             || system == "aarch64-linux"
              || system == "mips64el-linux";
       isGNU = system == "i686-gnu"; # GNU/Hurd
       isGlibc = isGNU # useful for `stdenvNative'
@@ -348,6 +349,7 @@ let
       isArm = system == "armv5tel-linux"
            || system == "armv6l-linux"
            || system == "armv7l-linux";
+      isAarch64 = system == "aarch64-linux";
       isBigEndian = system == "powerpc-linux";
 
       # Whether we should run paxctl to pax-mark binaries.
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 611628b35aba..41695b5c36b5 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -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")
diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
index 38b3e611bc28..9cce27ba5b6b 100644
--- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
+++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
@@ -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";
 }