Merge pull request #44124 from grahamc/sparc

systems: Allow detection of powerpc and sparc

Changed files
+6
lib
pkgs
build-support
bintools-wrapper
+1
lib/systems/inspect.nix
···
isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
isMips = { cpu = { family = "mips"; }; };
isRiscV = { cpu = { family = "riscv"; }; };
+
isSparc = { cpu = { family = "sparc"; }; };
isWasm = { cpu = { family = "wasm"; }; };
is32bit = { cpu = { bits = 32; }; };
+3
lib/systems/parse.nix
···
riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; };
riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; };
+
sparc = { bits = 32; significantByte = bigEndian; family = "sparc"; };
+
sparc64 = { bits = 64; significantByte = bigEndian; family = "sparc"; };
+
wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; };
wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; };
};
+2
pkgs/build-support/bintools-wrapper/default.nix
···
"mips64" = "btsmip";
"mips64el" = "ltsmip";
}.${targetPlatform.parsed.cpu.name}
+
else if targetPlatform.isPowerPC then "powerpc"
+
else if targetPlatform.isSparc then "sparc"
else throw "unknown emulation for platform: " + targetPlatform.config;
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);