aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
diff options
context:
space:
mode:
authorViktor Malik <[email protected]>2024-11-01 08:27:11 +0000
committerAndrii Nakryiko <[email protected]>2024-11-11 16:17:38 +0000
commitec8d3b5c2adc356d3b34c0fe44a5be74022be037 (patch)
tree5e419dd2f790532fef4ee24e30b9f74500aac002 /tools/testing/selftests/bpf/prog_tests/queue_stack_map.c
parentMerge tag 'perf-core-for-bpf-next' from tip tree (diff)
downloadkernel-ec8d3b5c2adc356d3b34c0fe44a5be74022be037.tar.gz
kernel-ec8d3b5c2adc356d3b34c0fe44a5be74022be037.zip
selftests/bpf: Allow building with extra flags
In order to specify extra compilation or linking flags to BPF selftests, it is possible to set EXTRA_CFLAGS and EXTRA_LDFLAGS from the command line. The problem is that they are not propagated to sub-make calls (runqslower, bpftool, libbpf) and in the better case are not applied, in the worse case cause the entire build fail. Propagate EXTRA_CFLAGS and EXTRA_LDFLAGS to the sub-makes. This, for instance, allows to build selftests as PIE with $ make EXTRA_CFLAGS='-fPIE' EXTRA_LDFLAGS='-pie' Without this change, the command would fail because libbpf.a would not be built with -fPIE and other PIE binaries would not link against it. The only problem is that we have to explicitly provide empty EXTRA_CFLAGS='' and EXTRA_LDFLAGS='' to the builds of kernel modules as we don't want to build modules with flags used for userspace (the above example would fail as kernel doesn't support PIE). Signed-off-by: Viktor Malik <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/queue_stack_map.c')
0 files changed, 0 insertions, 0 deletions