Skip to content

Commit 9151d80

Browse files
bjorn-rivosgregkh
authored andcommitted
selftests: bpf: Add missing per-arch include path
[ Upstream commit 19090f0 ] The prog_tests programs do not include the per-arch tools include path, e.g. tools/arch/riscv/include. Some architectures depend those files to build properly. Include tools/arch/$(SUBARCH)/include in the selftests bpf build. Fixes: 6d74d17 ("tools: Add riscv barrier implementation") Signed-off-by: Björn Töpel <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent 1fcc87e commit 9151d80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ TOOLSDIR := $(abspath ../../..)
1010
LIBDIR := $(TOOLSDIR)/lib
1111
BPFDIR := $(LIBDIR)/bpf
1212
TOOLSINCDIR := $(TOOLSDIR)/include
13+
TOOLSARCHINCDIR := $(TOOLSDIR)/arch/$(SRCARCH)/include
1314
BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
1415
APIDIR := $(TOOLSINCDIR)/uapi
1516
ifneq ($(O),)
@@ -44,7 +45,7 @@ CFLAGS += -g $(OPT_FLAGS) -rdynamic \
4445
-Wall -Werror -fno-omit-frame-pointer \
4546
$(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS) \
4647
-I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \
47-
-I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)
48+
-I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT)
4849
LDFLAGS += $(SAN_LDFLAGS)
4950
LDLIBS += $(LIBELF_LIBS) -lz -lrt -lpthread
5051

0 commit comments

Comments
 (0)