mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 22:14:42 +00:00
Merge pull request #127922 from roblabla/enable-btf
linux-kernel: Enable BTF
This commit is contained in:
commit
29766697ff
@ -35,7 +35,12 @@ let
|
||||
options = {
|
||||
|
||||
debug = {
|
||||
DEBUG_INFO = if (features.debug or false) then yes else no;
|
||||
# Necessary for BTF
|
||||
DEBUG_INFO = mkMerge [
|
||||
(whenOlder "5.2" (if (features.debug or false) then yes else no))
|
||||
(whenAtLeast "5.2" yes)
|
||||
];
|
||||
DEBUG_INFO_BTF = whenAtLeast "5.2" yes;
|
||||
DEBUG_KERNEL = yes;
|
||||
DEBUG_DEVRES = no;
|
||||
DYNAMIC_DEBUG = yes;
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lib, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
|
||||
, libelf, cpio, elfutils, zstd, gawk, python3Minimal
|
||||
, libelf, cpio, elfutils, zstd, gawk, python3Minimal, zlib, pahole
|
||||
, writeTextFile
|
||||
}:
|
||||
|
||||
@ -316,10 +316,12 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat
|
||||
++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf
|
||||
# Removed util-linuxMinimal since it should not be a dependency.
|
||||
++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
|
||||
++ optional (lib.versionAtLeast version "5.2") cpio
|
||||
++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole ]
|
||||
++ optional (lib.versionAtLeast version "5.8") elfutils
|
||||
;
|
||||
|
||||
buildInputs = optional (lib.versionAtLeast version "5.2") zlib;
|
||||
|
||||
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];
|
||||
|
||||
# Absolute paths for compilers avoid any PATH-clobbering issues.
|
||||
|
Loading…
Reference in New Issue
Block a user