OSDN Git Service

bpf: Fix cold build of test_progs-no_alu32
authorBrendan Jackman <jackmanb@google.com>
Thu, 3 Dec 2020 12:08:50 +0000 (12:08 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 3 Dec 2020 20:10:53 +0000 (12:10 -0800)
This object lives inside the trunner output dir,
i.e. tools/testing/selftests/bpf/no_alu32/btf_data.o

At some point it gets copied into the parent directory during another
part of the build, but that doesn't happen when building
test_progs-no_alu32 from clean.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/bpf/20201203120850.859170-1-jackmanb@google.com
tools/testing/selftests/bpf/Makefile

index 894192c..371b022 100644 (file)
@@ -378,7 +378,7 @@ $(OUTPUT)/$(TRUNNER_BINARY): $(TRUNNER_TEST_OBJS)                   \
                             | $(TRUNNER_BINARY)-extras
        $$(call msg,BINARY,,$$@)
        $(Q)$$(CC) $$(CFLAGS) $$(filter %.a %.o,$$^) $$(LDLIBS) -o $$@
-       $(Q)$(RESOLVE_BTFIDS) --no-fail --btf btf_data.o $$@
+       $(Q)$(RESOLVE_BTFIDS) --no-fail --btf $(TRUNNER_OUTPUT)/btf_data.o $$@
 
 endef