OSDN Git Service

selftests: net: Fix O=dir builds
authorBjörn Töpel <bjorn@rivosinc.com>
Tue, 6 Dec 2022 10:28:38 +0000 (11:28 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Dec 2022 03:26:18 +0000 (19:26 -0800)
commit17961a37ce4077ae43128ba5ce0b1dfd8f02fdb9
tree3d4ee001839f100255a6342e1536a9153c686704
parentce87a957f1d50205964728b2f1bc6e40243c7b85
selftests: net: Fix O=dir builds

The BPF Makefile in net/bpf did incorrect path substitution for O=dir
builds, e.g.

  make O=/tmp/kselftest headers
  make O=/tmp/kselftest -C tools/testing/selftests

would fail in selftest builds [1] net/ with

  clang-16: error: no such file or directory: 'kselftest/net/bpf/nat6to4.c'
  clang-16: error: no input files

Add a pattern prerequisite and an order-only-prerequisite (for
creating the directory), to resolve the issue.

[1] https://lore.kernel.org/all/202212060009.34CkQmCN-lkp@intel.com/

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 837a3d66d698 ("selftests: net: Add cross-compilation support for BPF programs")
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Link: https://lore.kernel.org/r/20221206102838.272584-1-bjorn@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/bpf/Makefile