linux: enable kcmp() system call

Since 2020, Mesa requires the kcmp() system call to be available for
some of its functionality. At the moment, this system call is enabled
when CHECKPOINT_RESTORE is enabled in the Linux kernel. This option is
also enabled by default in Fedora and Debian.

This patch enables CHECKPOINT_RESTORE by default on all kernel
versions where it is not marked as EXPERT, i.e. everything after and
including 4.19.

Fixes #112082.
This commit is contained in:
Julian Stecklina 2021-02-15 22:48:12 +01:00 committed by Michael Weiss
parent afcea01614
commit 4c73c02917
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83

View File

@ -637,7 +637,12 @@ let
XZ_DEC_TEST = option no;
};
criu = optionalAttrs (features.criu or false) ({
criu = if (versionAtLeast version "4.19") then {
# Unconditionally enabled, because it is required for CRIU and
# it provides the kcmp() system call that Mesa depends on.
CHECKPOINT_RESTORE = yes;
} else optionalAttrs (features.criu or false) ({
# For older kernels, CHECKPOINT_RESTORE is hidden behind EXPERT.
EXPERT = yes;
CHECKPOINT_RESTORE = yes;
} // optionalAttrs (features.criu_revert_expert or true) {