Merge branch 'master' into add-newer-xcode-hashes
This commit is contained in:
@@ -12,6 +12,12 @@ rec {
|
||||
broadwell = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "fma" ];
|
||||
skylake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "fma" ];
|
||||
skylake-avx512 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
cannonlake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
icelake-client = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
icelake-server = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
cascadelake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
cooperlake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
tigerlake = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" "avx2" "avx512" "fma" ];
|
||||
# x86_64 AMD
|
||||
btver1 = [ "sse3" "ssse3" "sse4_1" "sse4_2" ];
|
||||
btver2 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "aes" "avx" ];
|
||||
@@ -21,6 +27,7 @@ rec {
|
||||
bdver4 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" "fma4" ];
|
||||
znver1 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" ];
|
||||
znver2 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" ];
|
||||
znver3 = [ "sse3" "ssse3" "sse4_1" "sse4_2" "sse4a" "aes" "avx" "avx2" "fma" ];
|
||||
# other
|
||||
armv5te = [ ];
|
||||
armv6 = [ ];
|
||||
@@ -41,15 +48,38 @@ rec {
|
||||
broadwell = [ "haswell" ] ++ inferiors.haswell;
|
||||
skylake = [ "broadwell" ] ++ inferiors.broadwell;
|
||||
skylake-avx512 = [ "skylake" ] ++ inferiors.skylake;
|
||||
|
||||
# x86_64 AMD
|
||||
# TODO: fill this (need testing)
|
||||
btver1 = [ ];
|
||||
btver2 = [ ]; # TODO: fill this (need testing)
|
||||
bdver1 = [ ]; # TODO: fill this (need testing)
|
||||
bdver2 = [ ]; # TODO: fill this (need testing)
|
||||
bdver3 = [ ]; # TODO: fill this (need testing)
|
||||
bdver4 = [ ]; # TODO: fill this (need testing)
|
||||
znver1 = [ ]; # TODO: fill this (need testing)
|
||||
znver2 = [ ]; # TODO: fill this (need testing)
|
||||
btver2 = [ ];
|
||||
bdver1 = [ ];
|
||||
bdver2 = [ ];
|
||||
bdver3 = [ ];
|
||||
bdver4 = [ ];
|
||||
# Regarding `skylake` as inferior of `znver1`, there are reports of
|
||||
# successful usage by Gentoo users and Phoronix benchmarking of different
|
||||
# `-march` targets.
|
||||
#
|
||||
# The GCC documentation on extensions used and wikichip documentation
|
||||
# regarding supperted extensions on znver1 and skylake was used to create
|
||||
# this partial order.
|
||||
#
|
||||
# Note:
|
||||
#
|
||||
# - The succesors of `skylake` (`cannonlake`, `icelake`, etc) use `avx512`
|
||||
# which no current AMD Zen michroarch support.
|
||||
# - `znver1` uses `ABM`, `CLZERO`, `CX16`, `MWAITX`, and `SSE4A` which no
|
||||
# current Intel microarch support.
|
||||
#
|
||||
# https://www.phoronix.com/scan.php?page=article&item=amd-znver3-gcc11&num=1
|
||||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||
# https://en.wikichip.org/wiki/amd/microarchitectures/zen
|
||||
# https://en.wikichip.org/wiki/intel/microarchitectures/skylake
|
||||
znver1 = [ "skylake" ] ++ inferiors.skylake;
|
||||
znver2 = [ "znver1" ] ++ inferiors.znver1;
|
||||
znver3 = [ "znver2" ] ++ inferiors.znver2;
|
||||
|
||||
# other
|
||||
armv5te = [ ];
|
||||
armv6 = [ ];
|
||||
|
||||
@@ -25,7 +25,7 @@ rec {
|
||||
system = parse.doubleFromSystem final.parsed;
|
||||
config = parse.tripleFromSystem final.parsed;
|
||||
# Just a guess, based on `system`
|
||||
platform = platforms.selectBySystem final.system;
|
||||
platform = platforms.select final;
|
||||
# Determine whether we are compatible with the provided CPU
|
||||
isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu;
|
||||
# Derived meta-data
|
||||
@@ -83,7 +83,7 @@ rec {
|
||||
if final.isAarch32 then "arm"
|
||||
else if final.isAarch64 then "arm64"
|
||||
else if final.isx86_32 then "x86"
|
||||
else if final.isx86_64 then "ia64"
|
||||
else if final.isx86_64 then "x86"
|
||||
else if final.isMips then "mips"
|
||||
else final.parsed.cpu.name;
|
||||
|
||||
@@ -124,6 +124,8 @@ rec {
|
||||
then "${qemu-user}/bin/qemu-${final.qemuArch}"
|
||||
else if final.isWasi
|
||||
then "${pkgs.wasmtime}/bin/wasmtime"
|
||||
else if final.isMmix
|
||||
then "${pkgs.mmixware}/bin/mmix"
|
||||
else throw "Don't know how to run ${final.config} executables.";
|
||||
|
||||
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
||||
|
||||
@@ -35,6 +35,9 @@ let
|
||||
"msp430-none"
|
||||
"riscv64-none" "riscv32-none"
|
||||
"vc4-none"
|
||||
"or1k-none"
|
||||
|
||||
"mmix-mmixware"
|
||||
|
||||
"js-ghcjs"
|
||||
|
||||
@@ -56,8 +59,10 @@ in {
|
||||
i686 = filterDoubles predicates.isi686;
|
||||
x86_64 = filterDoubles predicates.isx86_64;
|
||||
mips = filterDoubles predicates.isMips;
|
||||
mmix = filterDoubles predicates.isMmix;
|
||||
riscv = filterDoubles predicates.isRiscV;
|
||||
vc4 = filterDoubles predicates.isVc4;
|
||||
or1k = filterDoubles predicates.isOr1k;
|
||||
js = filterDoubles predicates.isJavaScript;
|
||||
|
||||
bigEndian = filterDoubles predicates.isBigEndian;
|
||||
|
||||
@@ -7,7 +7,7 @@ let
|
||||
|
||||
riscv = bits: {
|
||||
config = "riscv${bits}-unknown-linux-gnu";
|
||||
platform = platforms.riscv-multiplatform bits;
|
||||
platform = platforms.riscv-multiplatform;
|
||||
};
|
||||
in
|
||||
|
||||
@@ -34,6 +34,16 @@ rec {
|
||||
platform = platforms.raspberrypi;
|
||||
};
|
||||
|
||||
remarkable1 = {
|
||||
config = "armv7l-unknown-linux-gnueabihf";
|
||||
platform = platforms.zero-gravitas;
|
||||
};
|
||||
|
||||
remarkable2 = {
|
||||
config = "armv7l-unknown-linux-gnueabihf";
|
||||
platform = platforms.zero-sugar;
|
||||
};
|
||||
|
||||
armv7l-hf-multiplatform = {
|
||||
config = "armv7l-unknown-linux-gnueabihf";
|
||||
platform = platforms.armv7l-hf-multiplatform;
|
||||
@@ -100,13 +110,18 @@ rec {
|
||||
riscv64-embedded = {
|
||||
config = "riscv64-none-elf";
|
||||
libc = "newlib";
|
||||
platform = platforms.riscv-multiplatform "64";
|
||||
platform = platforms.riscv-multiplatform;
|
||||
};
|
||||
|
||||
riscv32-embedded = {
|
||||
config = "riscv32-none-elf";
|
||||
libc = "newlib";
|
||||
platform = platforms.riscv-multiplatform "32";
|
||||
platform = platforms.riscv-multiplatform;
|
||||
};
|
||||
|
||||
mmix = {
|
||||
config = "mmix-unknown-mmixware";
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
msp430 = {
|
||||
@@ -124,6 +139,12 @@ rec {
|
||||
platform = {};
|
||||
};
|
||||
|
||||
or1k = {
|
||||
config = "or1k-elf";
|
||||
libc = "newlib";
|
||||
platform = {};
|
||||
};
|
||||
|
||||
arm-embedded = {
|
||||
config = "arm-none-eabi";
|
||||
libc = "newlib";
|
||||
|
||||
@@ -17,6 +17,7 @@ rec {
|
||||
isAarch32 = { cpu = { family = "arm"; bits = 32; }; };
|
||||
isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
|
||||
isMips = { cpu = { family = "mips"; }; };
|
||||
isMmix = { cpu = { family = "mmix"; }; };
|
||||
isRiscV = { cpu = { family = "riscv"; }; };
|
||||
isSparc = { cpu = { family = "sparc"; }; };
|
||||
isWasm = { cpu = { family = "wasm"; }; };
|
||||
@@ -24,6 +25,7 @@ rec {
|
||||
isVc4 = { cpu = { family = "vc4"; }; };
|
||||
isAvr = { cpu = { family = "avr"; }; };
|
||||
isAlpha = { cpu = { family = "alpha"; }; };
|
||||
isOr1k = { cpu = { family = "or1k"; }; };
|
||||
isJavaScript = { cpu = cpuTypes.js; };
|
||||
|
||||
is32bit = { cpu = { bits = 32; }; };
|
||||
|
||||
+21
-14
@@ -93,6 +93,8 @@ rec {
|
||||
mips64 = { bits = 64; significantByte = bigEndian; family = "mips"; };
|
||||
mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; };
|
||||
|
||||
mmix = { bits = 64; significantByte = bigEndian; family = "mmix"; };
|
||||
|
||||
powerpc = { bits = 32; significantByte = bigEndian; family = "power"; };
|
||||
powerpc64 = { bits = 64; significantByte = bigEndian; family = "power"; };
|
||||
powerpc64le = { bits = 64; significantByte = littleEndian; family = "power"; };
|
||||
@@ -114,6 +116,8 @@ rec {
|
||||
|
||||
vc4 = { bits = 32; significantByte = littleEndian; family = "vc4"; };
|
||||
|
||||
or1k = { bits = 32; significantByte = bigEndian; family = "or1k"; };
|
||||
|
||||
js = { bits = 32; significantByte = littleEndian; family = "js"; };
|
||||
};
|
||||
|
||||
@@ -268,19 +272,20 @@ rec {
|
||||
kernels = with execFormats; with kernelFamilies; setTypes types.openKernel {
|
||||
# TODO(@Ericson2314): Don't want to mass-rebuild yet to keeping 'darwin' as
|
||||
# the nnormalized name for macOS.
|
||||
macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; };
|
||||
ios = { execFormat = macho; families = { inherit darwin; }; };
|
||||
freebsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
linux = { execFormat = elf; families = { }; };
|
||||
netbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
none = { execFormat = unknown; families = { }; };
|
||||
openbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
solaris = { execFormat = elf; families = { }; };
|
||||
wasi = { execFormat = wasm; families = { }; };
|
||||
redox = { execFormat = elf; families = { }; };
|
||||
windows = { execFormat = pe; families = { }; };
|
||||
ghcjs = { execFormat = unknown; families = { }; };
|
||||
genode = { execFormat = elf; families = { }; };
|
||||
macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; };
|
||||
ios = { execFormat = macho; families = { inherit darwin; }; };
|
||||
freebsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
linux = { execFormat = elf; families = { }; };
|
||||
netbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
none = { execFormat = unknown; families = { }; };
|
||||
openbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
solaris = { execFormat = elf; families = { }; };
|
||||
wasi = { execFormat = wasm; families = { }; };
|
||||
redox = { execFormat = elf; families = { }; };
|
||||
windows = { execFormat = pe; families = { }; };
|
||||
ghcjs = { execFormat = unknown; families = { }; };
|
||||
genode = { execFormat = elf; families = { }; };
|
||||
mmixware = { execFormat = unknown; families = { }; };
|
||||
} // { # aliases
|
||||
# 'darwin' is the kernel for all of them. We choose macOS by default.
|
||||
darwin = kernels.macos;
|
||||
@@ -382,7 +387,7 @@ rec {
|
||||
else if (elemAt l 1) == "elf"
|
||||
then { cpu = elemAt l 0; vendor = "unknown"; kernel = "none"; abi = elemAt l 1; }
|
||||
else { cpu = elemAt l 0; kernel = elemAt l 1; };
|
||||
"3" = # Awkwards hacks, beware!
|
||||
"3" = # Awkward hacks, beware!
|
||||
if elemAt l 1 == "apple"
|
||||
then { cpu = elemAt l 0; vendor = "apple"; kernel = elemAt l 2; }
|
||||
else if (elemAt l 1 == "linux") || (elemAt l 2 == "gnu")
|
||||
@@ -393,6 +398,8 @@ rec {
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "wasi"; }
|
||||
else if (elemAt l 2 == "redox")
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "redox"; }
|
||||
else if (elemAt l 2 == "mmixware")
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "mmixware"; }
|
||||
else if hasPrefix "netbsd" (elemAt l 2)
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
|
||||
else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"])
|
||||
|
||||
+49
-23
@@ -47,7 +47,6 @@ rec {
|
||||
arch = "armv5te";
|
||||
};
|
||||
|
||||
kernelMajor = "2.6";
|
||||
kernelBaseConfig = "multi_v5_defconfig";
|
||||
kernelArch = "arm";
|
||||
kernelAutoModules = false;
|
||||
@@ -70,7 +69,6 @@ rec {
|
||||
|
||||
sheevaplug = {
|
||||
name = "sheevaplug";
|
||||
kernelMajor = "2.6";
|
||||
kernelBaseConfig = "multi_v5_defconfig";
|
||||
kernelArch = "arm";
|
||||
kernelAutoModules = false;
|
||||
@@ -182,7 +180,6 @@ rec {
|
||||
|
||||
raspberrypi = {
|
||||
name = "raspberrypi";
|
||||
kernelMajor = "2.6";
|
||||
kernelBaseConfig = "bcm2835_defconfig";
|
||||
kernelDTB = true;
|
||||
kernelArch = "arm";
|
||||
@@ -203,6 +200,35 @@ rec {
|
||||
# Legacy attribute, for compatibility with existing configs only.
|
||||
raspberrypi2 = armv7l-hf-multiplatform;
|
||||
|
||||
zero-gravitas = {
|
||||
name = "zero-gravitas";
|
||||
kernelBaseConfig = "zero-gravitas_defconfig";
|
||||
kernelArch = "arm";
|
||||
# kernelTarget verified by checking /boot on reMarkable 1 device
|
||||
kernelTarget = "zImage";
|
||||
kernelAutoModules = false;
|
||||
kernelDTB = true;
|
||||
gcc = {
|
||||
fpu = "neon";
|
||||
cpu = "cortex-a9";
|
||||
};
|
||||
};
|
||||
|
||||
zero-sugar = {
|
||||
name = "zero-sugar";
|
||||
kernelBaseConfig = "zero-sugar_defconfig";
|
||||
kernelArch = "arm";
|
||||
kernelDTB = true;
|
||||
kernelAutoModules = false;
|
||||
kernelPreferBuiltin = true;
|
||||
kernelTarget = "zImage";
|
||||
gcc = {
|
||||
cpu = "cortex-a7";
|
||||
fpu = "neon-vfpv4";
|
||||
float-abi = "hard";
|
||||
};
|
||||
};
|
||||
|
||||
scaleway-c1 = armv7l-hf-multiplatform // {
|
||||
gcc = {
|
||||
cpu = "cortex-a9";
|
||||
@@ -212,7 +238,6 @@ rec {
|
||||
|
||||
utilite = {
|
||||
name = "utilite";
|
||||
kernelMajor = "2.6";
|
||||
kernelBaseConfig = "multi_v7_defconfig";
|
||||
kernelArch = "arm";
|
||||
kernelAutoModules = false;
|
||||
@@ -265,7 +290,6 @@ rec {
|
||||
|
||||
armv7l-hf-multiplatform = {
|
||||
name = "armv7l-hf-multiplatform";
|
||||
kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
|
||||
kernelBaseConfig = "multi_v7_defconfig";
|
||||
kernelArch = "arm";
|
||||
kernelDTB = true;
|
||||
@@ -313,7 +337,6 @@ rec {
|
||||
|
||||
aarch64-multiplatform = {
|
||||
name = "aarch64-multiplatform";
|
||||
kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
|
||||
kernelBaseConfig = "defconfig";
|
||||
kernelArch = "arm64";
|
||||
kernelDTB = true;
|
||||
@@ -352,7 +375,6 @@ rec {
|
||||
|
||||
ben_nanonote = {
|
||||
name = "ben_nanonote";
|
||||
kernelMajor = "2.6";
|
||||
kernelArch = "mips";
|
||||
gcc = {
|
||||
arch = "mips32";
|
||||
@@ -362,7 +384,6 @@ rec {
|
||||
|
||||
fuloong2f_n32 = {
|
||||
name = "fuloong2f_n32";
|
||||
kernelMajor = "2.6";
|
||||
kernelBaseConfig = "lemote2f_defconfig";
|
||||
kernelArch = "mips";
|
||||
kernelAutoModules = false;
|
||||
@@ -442,10 +463,9 @@ rec {
|
||||
## Other
|
||||
##
|
||||
|
||||
riscv-multiplatform = bits: {
|
||||
riscv-multiplatform = {
|
||||
name = "riscv-multiplatform";
|
||||
kernelArch = "riscv";
|
||||
bfdEmulation = "elf${bits}lriscv";
|
||||
kernelTarget = "vmlinux";
|
||||
kernelAutoModules = true;
|
||||
kernelBaseConfig = "defconfig";
|
||||
@@ -455,17 +475,23 @@ rec {
|
||||
'';
|
||||
};
|
||||
|
||||
selectBySystem = system: {
|
||||
i486-linux = pc32;
|
||||
i586-linux = pc32;
|
||||
i686-linux = pc32;
|
||||
x86_64-linux = pc64;
|
||||
armv5tel-linux = sheevaplug;
|
||||
armv6l-linux = raspberrypi;
|
||||
armv7a-linux = armv7l-hf-multiplatform;
|
||||
armv7l-linux = armv7l-hf-multiplatform;
|
||||
aarch64-linux = aarch64-multiplatform;
|
||||
mipsel-linux = fuloong2f_n32;
|
||||
powerpc64le-linux = powernv;
|
||||
}.${system} or pcBase;
|
||||
select = platform:
|
||||
# x86
|
||||
/**/ if platform.isx86_32 then pc32
|
||||
else if platform.isx86_64 then pc64
|
||||
|
||||
# ARM
|
||||
else if platform.isAarch32 then let
|
||||
version = platform.parsed.cpu.version or null;
|
||||
in if version == null then pcBase
|
||||
else if lib.versionOlder version "6" then sheevaplug
|
||||
else if lib.versionOlder version "7" then raspberrypi
|
||||
else armv7l-hf-multiplatform
|
||||
else if platform.isAarch64 then aarch64-multiplatform
|
||||
|
||||
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32
|
||||
|
||||
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv
|
||||
|
||||
else pcBase;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user