2010-07-28 12:55:54 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
2008-01-28 19:43:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2010-07-28 12:55:54 +01:00
|
|
|
name = "pth-2.0.7";
|
2018-08-20 19:43:43 +01:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/pth/${name}.tar.gz";
|
|
|
|
sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj";
|
|
|
|
};
|
2008-01-28 19:43:03 +00:00
|
|
|
|
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
2018-03-20 02:41:06 +00:00
|
|
|
preConfigure = stdenv.lib.optionalString stdenv.isAarch32 ''
|
2012-11-15 10:18:38 +00:00
|
|
|
configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9")
|
|
|
|
'';
|
2012-11-14 22:20:47 +00:00
|
|
|
|
2018-08-20 19:43:43 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-07-28 12:55:54 +01:00
|
|
|
description = "The GNU Portable Threads library";
|
2018-12-01 18:22:13 +00:00
|
|
|
homepage = https://www.gnu.org/software/pth;
|
2018-08-20 19:43:43 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.all;
|
2010-07-28 12:55:54 +01:00
|
|
|
};
|
2008-01-28 19:43:03 +00:00
|
|
|
}
|