Commit b086dd2d authored by Mickaël Salaün's avatar Mickaël Salaün Committed by Greg Kroah-Hartman

samples/bpf: Partially fixes the bpf.o build

[ Upstream commit c25ef6a5 ]

Do not build lib/bpf/bpf.o with this Makefile but use the one from the
library directory.  This avoid making a buggy bpf.o file (e.g. missing

This patch is useful if some code (e.g. Landlock tests) needs both the
bpf.o (from tools/lib/bpf) and the bpf_load.o (from samples/bpf).
Signed-off-by: default avatarMickaël Salaün <>
Cc: Alexei Starovoitov <>
Cc: Daniel Borkmann <>
Signed-off-by: default avatarDaniel Borkmann <>
Signed-off-by: default avatarSasha Levin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 64e5e46c
......@@ -179,13 +179,16 @@ LLC ?= llc
CLANG ?= clang
# Trick to allow make to be run from this directory
all: $(LIBBPF)
$(MAKE) -C ../../ $(CURDIR)/
$(MAKE) -C ../../ M=$(CURDIR) clean
@rm -f *~
$(MAKE) -C $(dir $@) $(notdir $@)
$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
$(call if_changed_dep,cc_s_c)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment