systems/parse.nix: support weird system configs
There are some weird ones out there that don’t follow any pattern: - arm-none-eabi - powerpc-none-eabi - aarch64-none-elf
This commit is contained in:
parent
8db71d9d77
commit
52dbd3380e
|
@ -119,6 +119,7 @@ rec {
|
||||||
apple = {};
|
apple = {};
|
||||||
pc = {};
|
pc = {};
|
||||||
|
|
||||||
|
none = {};
|
||||||
unknown = {};
|
unknown = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -202,6 +203,7 @@ rec {
|
||||||
cygnus = {};
|
cygnus = {};
|
||||||
msvc = {};
|
msvc = {};
|
||||||
eabi = {};
|
eabi = {};
|
||||||
|
elf = {};
|
||||||
|
|
||||||
androideabi = {};
|
androideabi = {};
|
||||||
android = {
|
android = {
|
||||||
|
@ -263,6 +265,8 @@ rec {
|
||||||
"2" = # We only do 2-part hacks for things Nix already supports
|
"2" = # We only do 2-part hacks for things Nix already supports
|
||||||
if elemAt l 1 == "cygwin"
|
if elemAt l 1 == "cygwin"
|
||||||
then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; }
|
then { cpu = elemAt l 0; kernel = "windows"; abi = "cygnus"; }
|
||||||
|
else if (elemAt l 1 == "eabi")
|
||||||
|
then { cpu = elemAt l 0; vendor = "none"; kernel = "none"; abi = elemAt l 1; }
|
||||||
else { cpu = elemAt l 0; kernel = elemAt l 1; };
|
else { cpu = elemAt l 0; kernel = elemAt l 1; };
|
||||||
"3" = # Awkwards hacks, beware!
|
"3" = # Awkwards hacks, beware!
|
||||||
if elemAt l 1 == "apple"
|
if elemAt l 1 == "apple"
|
||||||
|
@ -273,6 +277,10 @@ rec {
|
||||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; abi = "gnu"; }
|
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; abi = "gnu"; }
|
||||||
else if hasPrefix "netbsd" (elemAt l 2)
|
else if hasPrefix "netbsd" (elemAt l 2)
|
||||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
|
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
|
||||||
|
else if (elemAt l 2 == "eabi")
|
||||||
|
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "none"; abi = elemAt l 2; }
|
||||||
|
else if (elemAt l 2 == "elf")
|
||||||
|
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "none"; abi = elemAt l 2; }
|
||||||
else throw "Target specification with 3 components is ambiguous";
|
else throw "Target specification with 3 components is ambiguous";
|
||||||
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
|
"4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; };
|
||||||
}.${toString (length l)}
|
}.${toString (length l)}
|
||||||
|
|
Loading…
Reference in New Issue