summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2021-10-29 14:57:29 +0200
committerAndrii Nakryiko <andrii@kernel.org>2021-11-01 18:09:58 -0700
commit9741e07ece7c247dd65e1aa01e16b683f01c05a8 (patch)
treef8124044849c3341e81ed559ec03e4fa2dbc94e9 /Makefile
parent0869e5078afbd1b22c20832b391b2d85291bc0a8 (diff)
downloadlinux-9741e07ece7c247dd65e1aa01e16b683f01c05a8.tar.gz
linux-9741e07ece7c247dd65e1aa01e16b683f01c05a8.tar.bz2
linux-9741e07ece7c247dd65e1aa01e16b683f01c05a8.zip
kbuild: Unify options for BTF generation for vmlinux and modules
Using new PAHOLE_FLAGS variable to pass extra arguments to pahole for both vmlinux and modules BTF data generation. Adding new scripts/pahole-flags.sh script that detect and prints pahole options. [ fixed issues found by kernel test robot ] Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211029125729.70002-1-jolsa@kernel.org
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 437ccc66a1c2..8f24bceec62d 100644
--- a/Makefile
+++ b/Makefile
@@ -480,6 +480,8 @@ LZ4 = lz4c
XZ = xz
ZSTD = zstd
+PAHOLE_FLAGS = $(shell PAHOLE=$(PAHOLE) $(srctree)/scripts/pahole-flags.sh)
+
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
NOSTDINC_FLAGS :=
@@ -534,6 +536,7 @@ export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
+export PAHOLE_FLAGS
# Files to ignore in find ... statements