mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
0513eeee86
When building selftests with CFLAGS set via env variable, the value of CFLAGS is propagated into bpftool Makefile (called from selftests Makefile). This makes the compilation fail as _GNU_SOURCE is defined two times - once from selftests Makefile (by including lib.mk) and once from bpftool Makefile (by calling `llvm-config --cflags`): $ CFLAGS="" make -C tools/testing/selftests/bpf [...] CC /bpf-next/tools/testing/selftests/bpf/tools/build/bpftool/btf.o <command-line>: error: "_GNU_SOURCE" redefined [-Werror] <command-line>: note: this is the location of the previous definition cc1: all warnings being treated as errors [...] Filter out -D_GNU_SOURCE from the result of `llvm-config --cflags` in bpftool Makefile to prevent this error. Signed-off-by: Viktor Malik <vmalik@redhat.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Quentin Monnet <qmo@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/acec3108b62d4df1436cda777e58e93e033ac7a7.1730449390.git.vmalik@redhat.com |
||
---|---|---|
.. | ||
bash-completion | ||
Documentation | ||
skeleton | ||
.gitignore | ||
btf_dumper.c | ||
btf.c | ||
cfg.c | ||
cfg.h | ||
cgroup.c | ||
common.c | ||
feature.c | ||
gen.c | ||
iter.c | ||
jit_disasm.c | ||
json_writer.c | ||
json_writer.h | ||
link.c | ||
main.c | ||
main.h | ||
Makefile | ||
map_perf_ring.c | ||
map.c | ||
net.c | ||
netlink_dumper.c | ||
netlink_dumper.h | ||
perf.c | ||
pids.c | ||
prog.c | ||
struct_ops.c | ||
tracelog.c | ||
xlated_dumper.c | ||
xlated_dumper.h |