Building BPF samples out of srctree fails, because the output directory for progs shared with selftests (CGROUP_HELPERS, TRACE_HELPERS) is missing and the compiler cannot create output files. Fix by creating the output directory in Makefile. Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx> --- samples/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index f87ee02073ba..81ba0beca0a3 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -301,6 +301,7 @@ $(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h # But, there is no easy way to fix it, so just exclude it since it is # useless for BPF samples. $(obj)/%.o: $(src)/%.c + $(Q)mkdir -p $(@D) @echo " CLANG-bpf " $@ $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \ -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ -- 2.25.4