summary refs log tree commit diff
path: root/pkgs/development/libraries/v8
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-03-19 22:41:06 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-04-25 15:28:55 -0400
commitba52ae50488de85a9cf60a3a04f1c9ca7122ec74 (patch)
tree48f98024c9244c5d3142ee224d52b267f03853f0 /pkgs/development/libraries/v8
parente40213ed24dea5c816b12f13cbf6606323e31637 (diff)
downloadnixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.tar
nixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.tar.gz
nixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.tar.bz2
nixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.tar.lz
nixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.tar.xz
nixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.tar.zst
nixpkgs-ba52ae50488de85a9cf60a3a04f1c9ca7122ec74.zip
treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilĂ  we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile
Diffstat (limited to 'pkgs/development/libraries/v8')
-rw-r--r--pkgs/development/libraries/v8/3.16.14.nix4
-rw-r--r--pkgs/development/libraries/v8/6_x.nix2
-rw-r--r--pkgs/development/libraries/v8/default.nix2
3 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/libraries/v8/3.16.14.nix b/pkgs/development/libraries/v8/3.16.14.nix
index 73f5febb668..e1a9336e3a5 100644
--- a/pkgs/development/libraries/v8/3.16.14.nix
+++ b/pkgs/development/libraries/v8/3.16.14.nix
@@ -3,10 +3,10 @@
 assert readline != null;
 
 let
-  arch = if stdenv.isArm
+  arch = if stdenv.isAarch32
     then (if stdenv.is64bit then "arm64" else "arm")
     else (if stdenv.is64bit then "x64" else "ia32");
-  armHardFloat = stdenv.isArm && (stdenv.platform.gcc.float or null) == "hard";
+  armHardFloat = stdenv.isAarch32 && (stdenv.platform.gcc.float or null) == "hard";
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/libraries/v8/6_x.nix b/pkgs/development/libraries/v8/6_x.nix
index 4095ff20c2b..adebedbf2ac 100644
--- a/pkgs/development/libraries/v8/6_x.nix
+++ b/pkgs/development/libraries/v8/6_x.nix
@@ -4,7 +4,7 @@
 }:
 
 let
-  arch = if stdenv.isArm
+  arch = if stdenv.isAarch32
          then if stdenv.is64bit
               then"arm64"
               else "arm"
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
index f14ec4fc608..099794f6623 100644
--- a/pkgs/development/libraries/v8/default.nix
+++ b/pkgs/development/libraries/v8/default.nix
@@ -10,7 +10,7 @@ let
   arch = if stdenv.isx86_64 then "x64"
             else if stdenv.isi686 then "ia32"
             else if stdenv.isAarch64 then "arm64"
-            else if stdenv.isArm then "arm"
+            else if stdenv.isAarch32 then "arm"
             else throw "Unknown architecture for v8";
   git_url = "https://chromium.googlesource.com";
   clangFlag = if stdenv.isDarwin then "1" else "0";