lol

stdenv: Bringup aarch64 architecture support

+38 -2
+1 -1
lib/platforms.nix
··· 15 15 freebsd = ["i686-freebsd" "x86_64-freebsd"]; 16 16 gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */ 17 17 illumos = ["x86_64-solaris"]; 18 - linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "mips64el-linux"]; 18 + linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mips64el-linux"]; 19 19 netbsd = ["i686-netbsd" "x86_64-netbsd"]; 20 20 openbsd = ["i686-openbsd" "x86_64-openbsd"]; 21 21 unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
+1
pkgs/build-support/cc-wrapper/default.nix
··· 272 272 if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else 273 273 # ARM with a wildcard, which can be "" or "-armhf". 274 274 if stdenv.isArm then "ld-linux*.so.3" else 275 + if stdenv.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else 275 276 if stdenv.system == "powerpc-linux" then "ld.so.1" else 276 277 if stdenv.system == "mips64el-linux" then "ld.so.1" else 277 278 if stdenv.system == "x86_64-darwin" then "/usr/lib/dyld" else
+1
pkgs/stdenv/default.nix
··· 44 44 "armv5tel-linux" = stagesLinux; 45 45 "armv6l-linux" = stagesLinux; 46 46 "armv7l-linux" = stagesLinux; 47 + "aarch64-linux" = stagesLinux; 47 48 "mips64el-linux" = stagesLinux; 48 49 "powerpc-linux" = /* stagesLinux */ stagesNative; 49 50 "x86_64-darwin" = stagesDarwin;
+2
pkgs/stdenv/generic/default.nix
··· 311 311 || system == "armv5tel-linux" 312 312 || system == "armv6l-linux" 313 313 || system == "armv7l-linux" 314 + || system == "aarch64-linux" 314 315 || system == "mips64el-linux"; 315 316 isGNU = system == "i686-gnu"; # GNU/Hurd 316 317 isGlibc = isGNU # useful for `stdenvNative' ··· 348 349 isArm = system == "armv5tel-linux" 349 350 || system == "armv6l-linux" 350 351 || system == "armv7l-linux"; 352 + isAarch64 = system == "aarch64-linux"; 351 353 isBigEndian = system == "powerpc-linux"; 352 354 353 355 # Whether we should run paxctl to pax-mark binaries.
+1
pkgs/stdenv/linux/default.nix
··· 12 12 "armv5tel-linux" = import ./bootstrap-files/armv5tel.nix; 13 13 "armv6l-linux" = import ./bootstrap-files/armv6l.nix; 14 14 "armv7l-linux" = import ./bootstrap-files/armv7l.nix; 15 + "aarch64-linux" = import ./bootstrap-files/aarch64.nix; 15 16 "mips64el-linux" = import ./bootstrap-files/loongson2f.nix; 16 17 }.${localSystem.system} 17 18 or (abort "unsupported platform for the pure Linux stdenv")
+15 -1
pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
··· 50 50 }; 51 51 }; 52 52 53 + aarch64-multiplatform-crossSystem = { 54 + crossSystem = rec { 55 + config = "aarch64-linux-gnu"; 56 + bigEndian = false; 57 + arch = "aarch64"; 58 + withTLS = true; 59 + libc = "glibc"; 60 + platform = pkgsNoParams.platforms.aarch64-multiplatform; 61 + inherit (platform) gcc; 62 + }; 63 + }; 64 + 53 65 selectedCrossSystem = 54 66 if toolsArch == "armv5tel" then sheevaplugCrossSystem else 55 67 if toolsArch == "armv6l" then raspberrypiCrossSystem else 56 - if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else null; 68 + if toolsArch == "armv7l" then armv7l-hf-multiplatform-crossSystem else 69 + if toolsArch == "aarch64" then aarch64-multiplatform-crossSystem else null; 57 70 58 71 pkgsUnspliced = pkgsFun ({inherit system;} // selectedCrossSystem); 59 72 pkgs = pkgsUnspliced.splicedPackages; ··· 265 278 armv5tel = buildFor "armv5tel"; 266 279 armv6l = buildFor "armv6l"; 267 280 armv7l = buildFor "armv7l"; 281 + aarch64 = buildFor "aarch64"; 268 282 }
+17
pkgs/top-level/platforms.nix
··· 443 443 }; 444 444 }; 445 445 446 + aarch64-multiplatform = { 447 + name = "aarch64-multiplatform"; 448 + kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc. 449 + kernelHeadersBaseConfig = "defconfig"; 450 + kernelBaseConfig = "defconfig"; 451 + kernelArch = "arm64"; 452 + kernelDTB = true; 453 + kernelAutoModules = false; 454 + kernelExtraConfig = ""; 455 + uboot = null; 456 + kernelTarget = "Image"; 457 + gcc = { 458 + arch = "armv8-a"; 459 + }; 460 + }; 461 + 446 462 selectPlatformBySystem = system: { 447 463 "i686-linux" = pc32; 448 464 "x86_64-linux" = pc64; 449 465 "armv5tel-linux" = sheevaplug; 450 466 "armv6l-linux" = raspberrypi; 451 467 "armv7l-linux" = armv7l-hf-multiplatform; 468 + "aarch64-linux" = aarch64-multiplatform; 452 469 "mips64el-linux" = fuloong2f_n32; 453 470 }.${system} or pcBase; 454 471 }