Merge #118386: linux: don't compress by ZSTD on 32-bit

This commit is contained in:
Vladimír Čunát 2021-04-04 09:52:46 +02:00
commit 7f46b19d76
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -680,7 +680,14 @@ let
DEBUG_MEMORY_INIT = option yes;
});
misc = {
misc = let
# Use zstd for kernel compression if 64-bit and newer than 5.9, otherwise xz.
# i686 issues: https://github.com/NixOS/nixpkgs/pull/117961#issuecomment-812106375
useZstd = stdenv.buildPlatform.is64bit && versionAtLeast version "5.9";
in {
KERNEL_XZ = mkIf (!useZstd) yes;
KERNEL_ZSTD = mkIf useZstd yes;
HID_BATTERY_STRENGTH = yes;
# enabled by default in x86_64 but not arm64, so we do that here
HIDRAW = yes;
@ -696,10 +703,6 @@ let
MODULE_COMPRESS = yes;
MODULE_COMPRESS_XZ = yes;
# use zstd for kernel compression if newer than 5.9, else xz.
KERNEL_XZ = whenOlder "5.9" yes;
KERNEL_ZSTD = whenAtLeast "5.9" yes;
SYSVIPC = yes; # System-V IPC
AIO = yes; # POSIX asynchronous I/O