Skip to content

Commit

Permalink
bpf/preload: Make sure Makefile cleans up after itself, and add .giti…
Browse files Browse the repository at this point in the history
…gnore

The Makefile in bpf/preload builds a local copy of libbpf, but does not
properly clean up after itself. This can lead to subsequent compilation
failures, since the feature detection cache is kept around which can lead
subsequent detection to fail.

Fix this by properly setting clean-files, and while we're at it, also add a
.gitignore for the directory to ignore the build artifacts.

Fixes: d71fa5c ("bpf: Add kernel module with user mode driver that populates bpffs.")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200927193005.8459-1-toke@redhat.com
  • Loading branch information
Toke Høiland-Jørgensen authored and Alexei Starovoitov committed Sep 29, 2020
1 parent 3aae4a3 commit 9d9aae5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/bpf/preload/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/FEATURE-DUMP.libbpf
/bpf_helper_defs.h
/feature
/bpf_preload_umd
2 changes: 2 additions & 0 deletions kernel/bpf/preload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi \

userprogs := bpf_preload_umd

clean-files := $(userprogs) bpf_helper_defs.h FEATURE-DUMP.libbpf staticobjs/ feature/

bpf_preload_umd-objs := iterators/iterators.o
bpf_preload_umd-userldlibs := $(LIBBPF_A) -lelf -lz

Expand Down

0 comments on commit 9d9aae5

Please sign in to comment.