git.iko.soy/typeable/nixpkgs
on master help sign in
rustc: Support aarch64
commit491e5d8649e8587654a81baf119e3b66bce65102 authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi> dateSat 2 Dec 2017, 14:46 (9 years ago) parent94b7925
5 files changed+22−1
pkgs/development/compilers/rust/bootstrap.nix+3 pkgs/development/compilers/rust/default.nix+3−1 pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch+12 pkgs/development/compilers/rust/print-hashes.sh+1 pkgs/development/compilers/rust/rustc.nix+3
pkgs/development/compilers/rust/bootstrap.nix+3
@@ -9,6 +9,7 @@ let
99 hashes = {
1010 i686-unknown-linux-gnu = "abe592e06616cdc2fcca56ddbe482050dd49a1fada35e2af031c64fe6eb14668";
1111 x86_64-unknown-linux-gnu = "ca1cf3aed73ff03d065a7d3e57ecca92228d35dc36d9274a6597441319f18eb8";
12+ aarch64-unknown-linux-gnu = "eaab3df489d4d8f976c4327d812b9870730eed6d0bbd52712767083d02be7472";
1213 i686-apple-darwin = "b3c2470f8f132d285e6c989681e251592b67071bc9d93cac8a2e6b66f7bdfcb5";
1314 x86_64-apple-darwin = "fa1fb8896d5e327cbe6deeb50e6e9a3346de629f2e6bcbd8c10f19f3e2ed67d5";
1415 };
@@ -18,6 +19,8 @@ let
1819 then "i686-unknown-linux-gnu"
1920 else if stdenv.system == "x86_64-linux"
2021 then "x86_64-unknown-linux-gnu"
22+ else if stdenv.system == "aarch64-linux"
23+ then "aarch64-unknown-linux-gnu"
2124 else if stdenv.system == "i686-darwin"
2225 then "i686-apple-darwin"
2326 else if stdenv.system == "x86_64-darwin"
pkgs/development/compilers/rust/default.nix+3−1
@@ -23,7 +23,9 @@ rec {
2323
2424 patches = [
2525 ./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch
26− ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
26+ ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch
27+ # https://github.com/rust-lang/rust/issues/45410
28+ ++ stdenv.lib.optional stdenv.isAarch64 ./patches/aarch64-disable-test_loading_cosine.patch;
2729
2830 };
2931
pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/src/librustc_back/dynamic_lib.rs b/src/librustc_back/dynamic_lib.rs
2+index 1b42fa0..92256dc 100644
3+--- a/src/librustc_back/dynamic_lib.rs
4++++ b/src/librustc_back/dynamic_lib.rs
5+@@ -80,6 +80,7 @@ mod tests {
6+ use std::mem;
7+
8+ #[test]
9++ #[ignore]
10+ fn test_loading_cosine() {
11+ if cfg!(windows) {
12+ return
pkgs/development/compilers/rust/print-hashes.sh+1
@@ -10,6 +10,7 @@ set -euo pipefail
1010PLATFORMS=(
1111 i686-unknown-linux-gnu
1212 x86_64-unknown-linux-gnu
13+ aarch64-unknown-linux-gnu
1314 i686-apple-darwin
1415 x86_64-apple-darwin
1516)
pkgs/development/compilers/rust/rustc.nix+3
@@ -34,6 +34,9 @@ stdenv.mkDerivation {
3434
3535 __darwinAllowLocalNetworking = true;
3636
37+ # The build will fail at the very end on AArch64 without this.
38+ dontUpdateAutotoolsGnuConfigScripts = if stdenv.isAarch64 then true else null;
39+
3740 NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
3841
3942 # Enable nightly features in stable compiles (used for