summary refs log tree commit diff
path: root/pkgs/development/tools/misc
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/tools/misc
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/tools/misc')
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix2
-rw-r--r--pkgs/development/tools/misc/uhd/default.nix4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index 123f679d779..e65736a3e88 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
   # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
   configurePlatforms =
     # TODO(@Ericson2314): Figure out what's going wrong with Arm
-    if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
+    if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32
     then []
     else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
 
diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix
index 2ea87fe6d7f..011d0b3e80b 100644
--- a/pkgs/development/tools/misc/uhd/default.nix
+++ b/pkgs/development/tools/misc/uhd/default.nix
@@ -38,14 +38,14 @@ in stdenv.mkDerivation {
   # /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector<uhd::range_t>::iterator {aka __gnu_cxx::__normal_iterator<uhd::range_t*, std::vector<uhd::range_t> >}' changed in GCC 7.1
 
   cmakeFlags = [ "-DLIBUSB_INCLUDE_DIRS=${libusb1.dev}/include/libusb-1.0"] ++
-               [ (stdenv.lib.optionalString stdenv.isArm "-DCMAKE_CXX_FLAGS=-Wno-psabi") ];
+               [ (stdenv.lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ];
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ python pythonPackages.pyramid_mako orc libusb1 boost ];
 
   # Build only the host software
   preConfigure = "cd host";
-  patches = if stdenv.isArm then ./neon.patch else null;
+  patches = if stdenv.isAarch32 then ./neon.patch else null;
 
   postPhases = [ "installFirmware" ];