]> www.infradead.org Git - users/willy/linux.git/commitdiff
selftests/bpf: Fix out-of-tree build
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 13 Jan 2021 16:33:17 +0000 (17:33 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 14 Jan 2021 03:05:39 +0000 (19:05 -0800)
When building out-of-tree, the .skel.h files are generated into the
$(OUTPUT) directory, rather than $(CURDIR). Add $(OUTPUT) to the include
paths.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210113163319.1516382-3-jean-philippe@linaro.org
tools/testing/selftests/bpf/Makefile

index 95ce81513648dd39f67d8cf9e9f19773e977e74b..92888eed89f303dc4288068d120db1bd94aee9cf 100644 (file)
@@ -25,7 +25,7 @@ BPF_GCC               ?= $(shell command -v bpf-gcc;)
 SAN_CFLAGS     ?=
 CFLAGS += -g -rdynamic -Wall -O2 $(GENFLAGS) $(SAN_CFLAGS)             \
          -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)          \
-         -I$(TOOLSINCDIR) -I$(APIDIR)                                  \
+         -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)                      \
          -Dbpf_prog_load=bpf_prog_test_load                            \
          -Dbpf_load_program=bpf_test_load_program
 LDLIBS += -lcap -lelf -lz -lrt -lpthread