diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-05-15 06:22:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 06:22:25 +0000 |
commit | 78ae7ac75e1f68d96e4dc0e383eae62274afb833 (patch) | |
tree | 15c9d71e770d9beec43df8d12b9696793b5fd3e8 /lib | |
parent | 2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d (diff) | |
parent | c48794dcef927c8af48457f744cd81468046515e (diff) | |
download | nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.tar nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.tar.gz nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.tar.bz2 nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.tar.lz nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.tar.xz nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.tar.zst nixpkgs-78ae7ac75e1f68d96e4dc0e383eae62274afb833.zip |
Merge staging-next into staging
Diffstat (limited to 'lib')
-rw-r--r-- | lib/systems/parse.nix | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index a06ac0d11f7..accaeb652d0 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -121,15 +121,20 @@ rec { js = { bits = 32; significantByte = littleEndian; family = "js"; }; }; - # Determine where two CPUs are compatible with each other. That is, - # can we run code built for system b on system a? For that to - # happen, then the set of all possible possible programs that system - # b accepts must be a subset of the set of all programs that system - # a accepts. This compatibility relation forms a category where each - # CPU is an object and each arrow from a to b represents - # compatibility. CPUs with multiple modes of Endianness are - # isomorphic while all CPUs are endomorphic because any program - # built for a CPU can run on that CPU. + # Determine when two CPUs are compatible with each other. That is, + # can code built for system B run on system A? For that to happen, + # the programs that system B accepts must be a subset of the + # programs that system A accepts. + # + # We have the following properties of the compatibility relation, + # which must be preserved when adding compatibility information for + # additional CPUs. + # - (reflexivity) + # Every CPU is compatible with itself. + # - (transitivity) + # If A is compatible with B and B is compatible with C then A is compatible with C. + # - (compatible under multiple endianness) + # CPUs with multiple modes of endianness are pairwise compatible. isCompatible = a: b: with cpuTypes; lib.any lib.id [ # x86 (b == i386 && isCompatible a i486) |