From 6cd9a388df901e016cce9fcfecfad5cda5710e30 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 2 Aug 2022 15:23:29 +0300 Subject: [PATCH] linux: provide pahole when configuring The kernel checks the version of pahole at configuration time to know if it supports features like split BTFs. If pahole doesn't exist, all of that gets disabled in the config file, so the kernel ends up built without split BTFs, despite having a working pahole for the actual build. --- pkgs/os-specific/linux/kernel/generic.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index bca6554ca2ae..056544014f42 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -6,6 +6,7 @@ , gmp ? null , libmpc ? null , mpfr ? null +, pahole , lib , stdenv @@ -124,7 +125,8 @@ let depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl gmp libmpc mpfr ] - ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ]; + ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ] + ++ lib.optional (lib.versionAtLeast version "5.2") pahole; platformName = stdenv.hostPlatform.linux-kernel.name; # e.g. "defconfig"